Created
July 21, 2017 08:42
-
-
Save andrzejchm/3fe0ad9f976f8e34c653c122a81d48d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 RepositoryViewHolder extends RecyclerView.ViewHolder implements RepositoryRowView { | |
TextView titleTextView; | |
TextView starsCountTextView; | |
public RepositoryViewHolder(View itemView) { | |
super(itemView); | |
titleTextView = itemView.findViewById(R.id.repoTitleText); | |
starsCountTextView = itemView.findViewById(R.id.repoStarsCountText); | |
} | |
@Override | |
public void setTitle(String title) { | |
titleTextView.setText(title); | |
} | |
@Override | |
public void setStarCount(int starCount) { | |
starsCountTextView.setText(String.format("%s ★", starCount)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment