Answer the question
In order to leave comments, you need to log in
How to make a main page menu from RecycleView?
Good afternoon. I'm starting to learn android programming and ran into a problem that I can't find the answer to. I want to make an application where on the main page, let's say, there will be a menu. I want to implement it through RecycleView, since there is the possibility of the OnClick method on any item, as well as apply various templates to it.
I began to study this RecycleView and realized that everywhere its filling goes through an array (string), but is it possible to specifically bind this picture and this text to this item, the second to the second, etc.
I do not really understand how to implement such a method, since I am a beginner, and plus this is not shown / told anywhere.
For you to understand, I will attach a similar picture, it is on ios, but the essence is the same.
Answer the question
In order to leave comments, you need to log in
In order to populate a recycler, you need to implement an adapter . Inside the adapter, you can have a list of any data you want. When he asks you (onCreateViewHolder, onBindViewHolder) you must give your ViewHolder accordingly and fill it from your list.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question