Questions tagged [android-paging-library]
189 questions
5
votes
1 answer
Code after `pagingAdapter.submitData()` is not executed
I am writing a toy Android app using Kotlin flow and Android Paging 3 library. The app calls some remote API to get a list of photos, and display them using a RecyclerView with a PagingDataAdapter.
I find that the code after…

seemuch
- 233
- 1
- 2
- 11
5
votes
2 answers
Can not collect any flow after emitting Paging3 flow
I am using paging3 and I have two different paging source. The problem is Coroutine Scope only emit first paging flow
In ViewModel I have two paging flow
val pagingFlow1 = Pager(PagingConfig(pageSize = 50, prefetchDistance = 1)) {
…

ysfcyln
- 2,857
- 6
- 34
- 61
5
votes
1 answer
Displaying loading indicator with Paging Library
I've implemented paging library with Room. I'm using Single Source of Truth. Articles (my data) will be fetched via Retrofit and will be inserted into Room database. Then recyclerview adapter listens for data via ArticleItemBoundaryCallback:
public…

Teyyihan Aksu
- 156
- 2
- 10
5
votes
1 answer
Update a Single Item in a PagedList using Google's Paging Library
I have a simple list of Pokemon in a RecyclerView with just the Pokemon's name and a "Favorite" ToggleButton. I'm using the Paging Library from Android JetPack with a PageKeyedDataSource to retrieve small chunks of Pokemon and display them to the…

Calvin Rai
- 816
- 1
- 8
- 17
5
votes
0 answers
How to use requestedInitialKey in ItemKeyedDataSource.LoadInitialParams
I am learning android paging library and everything works perfectly. But whenever I invalidate the DataSource, the list is jumping to start position whenever a new item is added to the top of the list. I want to the list to add the item to top. But…

Sundaravel
- 464
- 5
- 16
5
votes
1 answer
Updating a single item in a recylerview. I am using paging library and would like to update a single item/row
I am passing pagedlist values to adapter using submit list. when i update a single item consider i am clicking a like button of a feed in a recyclerview. how to update the single item.
i am following this example for paging…

Vignesh R
- 125
- 8
4
votes
1 answer
Paging 3 - list scrolls to the beginning after database is updated multiple times
I'm using Paging 3 with RemoteMediator and Room to display a list of items in a RecyclerView with PagingDataAdapter. We have an issue that causes the list to jump to the beginning when underlying data saved in the database is updated multiple…

Natanael Ahac
- 51
- 3
4
votes
0 answers
Paging Library 3 problem when implement search with Room database
I'm trying to implement a search query with Paging 3 Library. I can not find any example so currently, it looking like below.
The problem is after the search query result show 2 items, but after I'm clear the filter query, first it rendered the…

Đinh Đàm Đình
- 41
- 2
4
votes
1 answer
Why my PagingSource doesn't give me any data?
The Elements of the project that don't work
And I check if data is no null and do default submitList in the fragment.
Btw here is the link to the documentation
SearchPagingSource
These logs aren't even shown
class SearchPagingSource(
private…

MrRobot1413
- 47
- 7
4
votes
0 answers
Paging Library 3 and prefetchDistance usage
I am using androidx.paging:paging-*:3.0.0-alpha13
I have such configs for pagination
PagingConfig(
pageSize = LOAD_SIZE,
enablePlaceholders = false,
initialLoadSize = LOAD_SIZE,
prefetchDistance = 2 )
I need…

Дмитро Яковлєв
- 396
- 4
- 17
4
votes
3 answers
Set span size in Paging Library with GridLayoutManager
set span size to 1 in GridLayoutManager when LoadState is Loading in Paging Library.
I have tried this solution but it's not working.
For replicate issue: clone this official repo and set GridLayoutManager in SearchRepositoriesActivity
My code is…

Kishore Jethava
- 6,666
- 5
- 35
- 51
4
votes
0 answers
How to use Paging for contact list in Android
I am trying to display contacts with search features in a RecyclerView by using the paging library. https://github.com/anujmiddha/paged-list-demo I follow this GitHub project. The following is a code snippet from my project. I am trying to fetch…

Rijo Kuriakose
- 164
- 1
- 11
4
votes
0 answers
Scroll to a position in paging library
I want to scroll to a position in recyclerview working with pagedlist adaptor but the problem is position to which I want to scroll is not loaded yet so can't scroll to that by using layoutmanager.scrollToPostion()
And placeholders are disabled…

Ajit singh rathore
- 41
- 1
- 3
4
votes
2 answers
ContiguousPagedList onPageError while I'm not using ContiguousPagedList
I have implementation of PositionalDataSource that defines loadInitial and loadRange. Paging works fine however under some boundary condition (likely related with loading next page in progress while exiting the screen) app crashes with…

ror
- 3,295
- 1
- 19
- 27
4
votes
0 answers
Android paging library - How to load data with paging library from certain position in the middle of the dataset?
I have an app that uses paging library to load contact data from room database. The query to load the data loads entries in asc/desc order and displays them in recycler view.
I want to implement sidebar with letters A-Z to jump to certain letter or…

SubK24
- 63
- 5