How do they work in the background?
I was a few familiar with the PagedListAdapter but not PagingDataAdapter(paging 3). What is the main usage of PagingDataAdapter and differ with PagedListAdapter
PagingDataAdapter is the Paging3 replacement for PagedListAdapter, it was rebuilt from the ground up to be Kotlin + Coroutines first, and supports synchronously reacting to LoadState + Errors (Paging2 didn't have these concepts built in), reactive transformations (including separators, LoadState-aware headers / footers via ConcatAdapter), and request de-duplication on top of a simplified API compared to Paging2.
To use PagingDataAdapter, it needs to hook up to the other Paging3 constructs via Pager, but all of these were built with backwards-compatibility with Paging2 in mind, so you can incrementally migrate from an existing project. e.g., Pager requires a () -> PagingSource<Key, Value>, but a DataSource.Factory.asPagingSourceFactory() exists for compatibility.
I highly recommend checking out:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With