Last active
June 12, 2016 19:47
-
-
Save frogermcs/398409987d2a07be31a6e1ba1dd445df to your computer and use it in GitHub Desktop.
ViewHolder and Dagger 2 example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RepositoriesListActivity extends BaseActivity { | |
@Bind(R.id.rvRepositories) | |
RecyclerView rvRepositories; | |
@Inject | |
RepositoriesListActivityPresenter presenter; | |
@Inject | |
RepositoriesListAdapter repositoriesListAdapter; | |
//... | |
private void setupRepositoriesListView() { | |
rvRepositories.setAdapter(repositoriesListAdapter); | |
rvRepositories.setLayoutManager(new LinearLayoutManager(this)); | |
} | |
@Override | |
protected void setupActivityComponent() { | |
GithubClientApplication.get(this).getUserComponent() | |
.plus(new RepositoriesListActivityModule(this)) | |
.inject(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment