Created
June 12, 2016 19:12
-
-
Save frogermcs/eadb4a653bde0430abdd023a135326e5 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
@AutoFactory(implementing = RepositoriesListViewHolderFactory.class) | |
public class RepositoryViewHolderNormal extends RepositoryViewHolder { | |
@Bind(R.id.tvName) | |
TextView tvName; | |
public RepositoryViewHolderNormal(ViewGroup parent) { | |
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_normal, parent, false)); | |
ButterKnife.bind(this, itemView); | |
} | |
@Override | |
public void bind(Repository repository) { | |
tvName.setText(repository.name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment