Skip to content

Instantly share code, notes, and snippets.

@andrzejchm
Created July 21, 2017 08:47
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 andrzejchm/ccaa3071a3912fac7af845f468fdfe81 to your computer and use it in GitHub Desktop.
Save andrzejchm/ccaa3071a3912fac7af845f468fdfe81 to your computer and use it in GitHub Desktop.
public class RepositoriesListPresenter {
private final List<Repository> repositories;
...
public void onBindRepositoryRowViewAtPosition(int position, RepositoryRowView rowView) {
Repository repo = repositories.get(position);
rowView.setStarCount(repo.getStarsCount());
rowView.setTitle(repo.getTitle());
}
public int getRepositoriesRowsCount() {
return repositories.size();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment