以下是Paging分页库加载Room数据的Java代码github地址:
https://github.com/mayangming/PagingWithRoomJavaSample
注意:
1、arch版本中的LivePagedListProvider类被移除了,替换成了LivePagedListBuilder。所以数据库中不能直接返回LivePagedListProvider,需要返回DataSource
参考链接:
https://developer.android.google.cn/topic/libraries/architecture/paging