Answer the question
In order to leave comments, you need to log in
How to correctly implement a repeating nested nested layout in a list?
Available for Layout:
- sub_lay1 c 24 TextView c onClick (only half is used in run);
- sub_lay2 as ExpandableLay with 48 TextView (to display amounts if necessary).
Fill item_main_lay:
- 2 pcs. sub_lay1;
- 2 pcs. sub_lay2.
In activity_main in HorizontalScrollView we insert 10 pcs. item_main_lay.
This is my special case. For clarity.
And in general terms, the question sounds like this - how to correctly implement lists with
layouts stuffed with a large number of Views?
Answer the question
In order to leave comments, you need to log in
RecyclerView + AdapterDelegates.
I assume that most views are the same, and therefore will be reused.
Even if they are all different (which I will be surprised), they will still be created lazily as needed.
In particularly difficult cases, you will have to write your own LayoutManager for this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question