0

I receive data (an object with few elements inside) from a server and I want to show it in RecyclerView. Each object could contain 2, 3, 4.. or even 18 elements (as on the picture): enter image description here

I know how to create different types of rows from pre-created XML layouts and use all these in RecyclerView, but how to deal with object with for example 18 elements?

Should I generate rows based on a number of elements in each object and after that inflate it in the adapter?

So, how to deal with 20+ different types of rows in 1 RecyclerView?

user3473445
  • 184
  • 5
  • 18

0 Answers0