Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Last active June 12, 2016 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/a421ff40c8ad3b030e95696b46455ecf to your computer and use it in GitHub Desktop.
Save frogermcs/a421ff40c8ad3b030e95696b46455ecf to your computer and use it in GitHub Desktop.
ViewHolder and Dagger 2 example Raw
public class MyActivity extends BaseActivity {
@Inject MyActivityPresenter presenter;
MyListAdapter adapter;
@Override
protected void injectDependencies() {
getAppComponent().plus(new MyActivityModule(this)).inject(this);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
//...
adapter = new MyListAdapter();
recyclerView.setAdapter(adapter);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment