Android – recyclerview nested in recyclerview performance

I have a recyclerview that lists many group items. Under each group item, I want another recyclerview with a grid layout of X items (up to 100 or two)

I've achieved this, but the performance when expanding group projects is very bad. This is because the nested recyclerview seems to render all its child nodes, not just those visible when expanding

Can anyone point out how I can solve this behavior? I want the recyclerview sub item to render and calculate only the currently visible items, just like the parent recycle bin view. Or should I start thinking about not nesting recyclerviews, but creating my own layout grid using the ViewGroup sub item?

resolvent:

I think this project will help you:

https://github.com/h6ah4i/android-advancedrecyclerview

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>