MVVMCross Nested Recyclerview Out of Memory Issue

半城伤御伤魂 提交于 2019-12-06 13:22:36

I used the solution "MvxItemTemplateSelector" which recently got added by "thefex" to MVVMCross, though it kinda means i have to flatten my data structure by hand (Categories and Channels to one layer).

https://github.com/MvvmCross/MvvmCross-AndroidSupport/pull/200

Thanks for this feature! Just wish the other way would work aswell, but maybe i can try to solve it when i got more time to spare.

Greetings Cyriac

The problem is that when nesting a ListView or RecyclerView, it can't measure the height of the nested View.

Hence, it will attempt to layout every view in the nested RecyclerView. This means, if that nested item has a lot of items, then your app will run into severe issues.

You should really avoid nesting such types of views unless you provide more information for the Android system to possibly know how to measure the children.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!