Open thexaib opened 3 years ago
Hi, In order to work with Paging3, you will need your adapter to inherited from PagingDataAdapter. (source)
OneAdapter is based on RecyclerView.Adapter and not PagingDataAdapter because I didn't want to rely on a brand new library (when it just came out) as a base for my library.
I wanted to add some kind of support back in the day for Paging2 but the paging library keeps changing and v2 is no longer that attractive. When Paging3 will be out of alpha and will prove its maturity I will try to add a way OneAdapter can integrate with it.
i also played around with paging 3, but i did not see much control on manually fetching next page and paging 2 looked like it could be done. but i failed :P. looking forward to paging adapter support.
Hi, this is more a question than an issue, related to Room Datasource+LiveData PagedList. I want to use selectable item feature of the OneAdapter, so i am trying to change currently working RecyclerView with PagedListAdapter. But for OneAdapter, i need to ask PagedList from Room datasource to load next items , which i could not find how can it be done. As i understand PagedListAdapter requests next loading of items automatically by calculating Item size and recyclerview viewport size. and calls
pagedlist.loadAround(Int)
. I am not sure about the Int value passed here, its probably the internally maintained enumerated index of current list. I could not find how can i request next page to load in viewmodel. Did anyone can direct me how to use Room Paging Datasource with OneAdapter.?OneAdapter Impl
Activity
viewmodel