Not getting notified on PagedList updates

限于喜欢 提交于 2019-12-10 14:47:00

问题


I am using the PagedList library in my app.

It all works as expected, using the PagedListAdapter. However, I am not able to find how I can get a callback and be notified that the PagedList has been updated.

At list's ItemKeyedDataSource is used to fetch the list's data from the network. At that point, the PagedListAdapter's submitList is called, providing a PagedList of length 0. When the DataSource has fetched the data from the network, its callback.onResult() is executed and the list's UI is updated showing the fetched items. However, this does not call the submitList method, and I have not found a way to be notified in the adapter of this update, as the onCurrentListChanged is neither called. How can the Adapter be notified of such changes?

Thank you :)

来源:https://stackoverflow.com/questions/50873871/not-getting-notified-on-pagedlist-updates

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