One question, for example to create a recyclerView I have to create its adapter and put the design inside, now if I want another design I necessarily have to create another adapter?? If it would be, each recyclerView has its own adapter and if I wanted another one I have to create another adapter, that's how it is, excuse me for the question but I have doubts. Thank you
You don't have to create another Adapter, you just have to implement
getItemViewType()
to define your different types of views:Create your ViewHolders:
In
onCreateViewHolder()
we return the type ofViewHolder
(Container):In
bindViewHolder()
we bind the type of view to recycle:So you could have different types of views with different features in a single
Adapter
: