codepath / codepath/android_guides

User in RecyclerView

Open
#299 2 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.