[英]RecyclerView inside NestedScrollView scroll faster than RecyclerView
RecyclerView inside NestedScrollView scroll faster, but when we remove NestedScrollView RecyclerView is not working smoothly, it stuck while scrolling and after full loaded, no problem in scrolling,it take some time to load data when it is inside RecyclerView without NestedScrollView NestedScrollView里面的RecyclerView滚动速度更快,但是当我们删除NestedScrollView时,RecyclerView工作不顺畅,它在滚动时卡住并且在完全加载后,滚动没问题,在没有NestedScrollView的RecyclerView里面加载数据需要一些时间
No issue if it is inside NestedScrollView but because of some issue we need to remove NestedScrollView . 如果它在NestedScrollView中没有问题,但由于某些问题,我们需要删除NestedScrollView。
How to solve this issue? 如何解决这个问题?
In your case RecyclerView
inside NestedScrollView
is faster because RecyclerView
haven't height limits and adapter load all items. 在你的情况RecyclerView
内NestedScrollView
比较快,因为RecyclerView
没有高度限制和适配负载的所有项目。 You have to use correct implementation of ViewHolder
pattern and don't block ui thread to get smoothly scrolling 您必须使用ViewHolder
模式的正确实现,并且不要阻止ui线程以顺利滚动
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.