Skip to content

Instantly share code, notes, and snippets.

@alaershov
Created June 4, 2019 17:10
Show Gist options
  • Save alaershov/fbb2dfd3c763d2627170ae4cca6a771c to your computer and use it in GitHub Desktop.
Save alaershov/fbb2dfd3c763d2627170ae4cca6a771c to your computer and use it in GitHub Desktop.
Toothpick: UserActivity with no DI
public final class UserActivity extends AppCompatActivity {
private UserRepository userRepository;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
userRepository = new UserRepository(getSharedPreferences("app.prefs", MODE_PRIVATE));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment