Hi there, I have a RecyclerView (vertical) with a ...
# android
j
Hi there, I have a RecyclerView (vertical) with a inner RecyclerView (also vertical). Reason I have that is because the inner RecyclerView has to be wrapped by a CardView and can be collapsed/expanded. Problem is that the inner adapter is not recycling the views and is binding all of them at once, not just the visible ones. Whats the suggestion to solve this problem or another approach to impl this? I thought about creating one single RecyclerView with an item decorator where the first have the card borders (left/top/right), the last have (left/bottom/right) and the others have just the left/right.
v
Nested recycler views in the same direction is not a good idea. Recyclerview needs to know its bounds to be able to scroll, but if it is within a scrollable container, then it has to lay out all its items immediately.
j
yep, i realized that after debugging my sol
Thank you for the response!