-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetpack Paging 3 support #88
Comments
I've tried to make an adapter, similar to what there is for v2 paging. But faced an issue that I couldn't find a way to extract "currentList" data from the PagingDataAdapter (or it's differ). So, workarounded that in the following way:
Could be good if someone also took a look at that. Maybe there is something that needs to be updated in the API of adapterdelegates, or maybe something can be incorporated as a feedback to Jetpack team (so they might expose "currentList" or something similar in the public api) Thank you |
Do you want to send me a PR for this? |
Hi @sockeqwe I'd be happy to help with that, but I have a feeling that it would be not that easy. Main issue I see is in AdapterDelegate interface. It is low-level interface in the whole lib, and it defines everything in terms of adapter's underlying list and position.
Here In Paging 3 lists are not exposed and not used inside. There are NullPaddedLists, but it is separate interface which doesn't relate to general List interface. Instead there are methods to get itemCount and item by position. Another workaround would be to make method "getCurrentList" as in Paging2 adapter based on getItem(position) and getItemCount. But that would have bad performance I guess. So, I'd be happy to help, but atm I'm a bit stuck on what is the right direction. |
Hello! |
Hello, |
Hi,
Paging 3 is a complete rework of previous paging solution by Google.
Adapter delegates have support for version 2.
Would be good to have support for version 3 as well.
Though version 3 is just announced and is currently in alpha, still would be good to have some initial support.
https://developer.android.com/topic/libraries/architecture/paging/v3-overview
Thank you
The text was updated successfully, but these errors were encountered: