PageKeyedDataSource loadAfter doesnt get fire

血红的双手。 提交于 2019-12-02 01:30:46

In the above code as you can see I didn't have called getitem under onBindViewHolder but once after I requested for getItem(itemPostion) it all started working has it supposed to be

Demo Project:

androidx-paging-library-demo-java

Apart from not calling getItem in onBindViewHolder, Not setting page size in config can also cause this problem, make sure you called: setPageSize(your_page_size) like this:

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