How does Android Paging Library know to load more data?

て烟熏妆下的殇ゞ 提交于 2019-11-30 17:52:55

The paging library should know automatically when to load new items. The problem in your implementation is that the paged RecyclerView is inside a NestedScrollView and according to this issue the libary doesn't have built in support for that.

when you put recyclerview inside an infinite scrolling parent, it will layout all of its children because the parent provides infinite dimensions.

You'll need to create your own implementation of Nested Scroll View, there is actually one here in this gist that might be able to help you.

It is also suggested to add fillViewPort to this custom nested scroll view:

android:fillViewport="true" to scrollable container

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