codepath / codepath/android_guides
User in RecyclerView
- Dominant language
- No language data
- Stars
- 28.3k
- Forks
- 6.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
I'm new to Android and love how in-depth these tutorials are compared to a lot of the other material online. However, I'm confused at where User and RecyclerViewSimpleTextViewHolder come from in the 'Heterogenous Layouts inside RecyclerView'.
```
private void configureDefaultViewHolder(RecyclerViewSimpleTextViewHolder vh, int position) {
vh.getLabel().setText((CharSequence) items. get(position));
private void configureViewHolder1(ViewHolder1 vh1, int position) {
User user = (User) items.get(position);
if (user != null) {
vh1.getLabel1().setText("Name: " + user.name);
vh1.getLabel2().setText("Hometown: " + user.hometown);
}
}`
```
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.