Questions tagged [android-paging]
The Paging Architecture Component makes it easier for your app to gradually load information as needed from a data source, without overloading the device or waiting too long for a big database query.
487
questions
-2
votes
0
answers
30
views
Android paging update item manually
I am using Android paging library and want to update manually whole item sometimes.
Can I do it somehow for whole object without knowing which exactly field was changed?
Also question if it will be ...
0
votes
0
answers
16
views
Update PagingSource data with new one (but keep previous data)
I am using PagingSource to get paginated data from a remote service. It works well when scrolling down to get the available data but I need to be able to scroll up (when in position 0) to load old ...
0
votes
0
answers
25
views
Update Paging Recycleview after item removed .. Firebase database
I don't know how to give the exact behavior to the recyclerview when I delete an article through the firebase database.
the first page updates normally when I delete a top post, a bottom post scrolls ...
1
vote
0
answers
20
views
Recursive synthetic property accessor, Can't get the size of list in PagingDataAdapter casue java.lang.StackOverflowError
In this app, I tried to use Paging3, Retrofit, and RXJava to get a list of popular movies, this is the link of API, the problem is in MoviesDataAdapter class when I didn't override getItemCount fun ...
0
votes
0
answers
27
views
LazyVertical grid - remove items coming from lazy paged list - Best practice?
I am having 2 tabs
1.All items
2.Favourite items
These are shown in a lazy vertical grid with paging v3.
I have called collect as lazy paging items outside of the composable screen and pass the lazy ...
0
votes
0
answers
55
views
How do you properly use paging with only a local database in Android?
I just recently began learning about paging in Android and completed Google's beginner tutorial that shows how to use paging with local code only, not using a Room database. The next tutorial from ...
0
votes
0
answers
12
views
Android PagingLibrary RecyclerView content is updated after receiving LoadState.NotLoading
According to documentation, I assume that when I receive LoadState.NotLoading, UI work is completed and RecyclerView shows new items:
Updates from loadStateFlow and addLoadStateListener() are ...
0
votes
0
answers
26
views
How to handle change in category with less items in paging 3 android?
I have around 200 items where items belong to different category and I load them category wise I change categories when one category ends and present them with paging library
I have a list of ...
0
votes
3
answers
217
views
In Jetpack Compose, how do I specifically handle errors in paging3 and display them on ui?
In my case, I'm requesting a GitHub API, if I request a lot of data, I might get a 403 error, while if I run out of requested data, GitHub will return me a 422 Unprocessable Entity. So I want to ...
0
votes
0
answers
60
views
Refreshing LazyPagingItems when one item state has changed
Basically I have a paging data flow collected in a composable function:
val list = state.listFlow.collectAsLazyPagingItems()
Each item on the list has a call-to-action button that will enable/disable ...
2
votes
0
answers
135
views
Pagination is not working after refresh() is called. [Paging 3 Library]
I'm currently working with paging 3 library. I'm able to populate the list and pagination is working as expected. But when I call adapter.refresh() method twice by using pull to refresh, the ...
1
vote
1
answer
149
views
LazyVerticalGrid for paging items in jetpack compose
I'm currently using paging items (LazyPagingItems) in LazyVerticalGrid via below extention function and it works fine.
inline fun <T : Any> LazyGridScope.items(
items: LazyPagingItems<T&...
0
votes
0
answers
39
views
How to update options in Firebase Paging Adapter?
I am using Firestore Paging Adapter to display posts from Firestore. Initially it shows all the posts. I want to add button that will filter posts, for example for particular date.
query = ...
0
votes
0
answers
25
views
Paging3 bounces back when jumping at the bottom and returning
Just show as the gif. paging3 bounces back when jumping at the bottom and returning.
What should I do?
0
votes
0
answers
62
views
Infinity stream of PagingData without pagination
I did this by android dev guide https://developer.android.com/topic/libraries/architecture/paging/v3-paged-data#kotlin
but my code didnt work normal.
This my code
PagingSource -https://github.com/...
0
votes
0
answers
31
views
Retrofit or Okhttp never called the link
So I got a problem, When the Main Page is shown, it's supposed to call the API to get the data from it. But, the API never called. What I find strange is, that before Main Page, there is a login page ...
0
votes
0
answers
88
views
Android Epoxy Carousel with Paging
I am creating nested recycler views using Epoxy Carousel to create a UI like in the image. The Vertical Recyclerview has a Categories List and the horizontal Recyclerview has videos. The goal is to ...
0
votes
1
answer
71
views
How to check if flow<PagingData<Item>> contains specific item?
I have a Flow of PagingData and I need to check if this flow contains specific Item value.
I know that I cant collect it by .collectAsLazyPagingItems().itemSnapshotList.items, but it is possible only ...
0
votes
1
answer
454
views
Android Paging 3 is not loading next page
After migrating from custom paging implementation to Jetpack Paging 3 library,
data is not loading as expected.
The first page is handled correctly according to the PagingConfig of Pager:
internal fun ...
0
votes
1
answer
446
views
How to handle result of paging data in compose and implement header and footer load states?
In View system there are official examples how to implement loading states and adding header and footer item to the list:
https://developer.android.com/topic/libraries/architecture/paging/load-state
...
2
votes
0
answers
126
views
Android paging 3 jumping and placeholder example
I’ve been searching a lot but couldn’t find an example how to jump from a position in a loaded page to another position in another page which hasn’t been loaded and how to implement placeholders.
I am ...
0
votes
0
answers
21
views
Schedulers.io() Throwing exception in my Unit Tests
When I call loadSingle() through my unit testing it throws NullPointerException for Subscirber.io(). Even though I am mocking the service that's used by the RxPagingSource
class SearchUserSource(
...
0
votes
0
answers
199
views
Unexpected behaviour on indexing in paging library 3
Hey I am working in Viewpager 2 with Paging library 3. I used viewpager 2 to show single date in page and doing increment/decrement by page swiping. I am passing current date in my current item of ...
3
votes
1
answer
1k
views
Paging 3 list auto refresh on navigation back in jetpack compose navigation
I am using Jetpack Compose, along with Paging 3 library & Jetpack Navigation. The issue I am facing is I have a LazyList which is fetching data from remote source using paging library.
ViewModel
...
0
votes
1
answer
297
views
Android paging library without using page number but with explicit next set of ids
Android paging library's PagingSource uses key like
PagingSource<Int, Item>
where the first parameter is the page number. What if the server, instead of using a page number, returns (for each ...
0
votes
0
answers
502
views
Pagination on Android jetpack compose LazyColumn
I am developing an Android Chat App using jetpack compose.
The chat messages are coming from WebSocket. (I use OkHttp library)
And all of the messages should be stored in the local database (I use ...
0
votes
0
answers
61
views
Firestore pagination multiple queries
After reading firestore doccumentation and some article
I found out this library 'android.arch.paging:runtime:1.0.0-alphal4-1' for pagination.
it works good but now my problem is that i want to pass ...
0
votes
1
answer
76
views
Paging3 with ViewPager not working (where pages use the same type of PagingSource)
I'm trying to use Paging3 with ViewPager in a project, but something strange is happening. I think it is due to the fact that each page uses the same type of PagingSource.
Here's how the page is ...
0
votes
1
answer
46
views
Setting the scrollState when listing a lazyColumn
To draw data using the paging and jetpack composite libraries, I use the LazyColumn(). The data comes in every second and I need to stop the view on the elements when I go down. Now they go lower when ...
1
vote
0
answers
28
views
Get another data from PagingDataSource
I am building a movie app and I just finish implementing Paging.
Right now I can only get the popular movies from the PagingDataSource and my question is how can I get another set of data, for example:...
0
votes
1
answer
126
views
How to pass MutableLiveData <String> from function to Pager?
I am trying to use my search function with Paging 3. I checked my addQuery() function and my _repoQuery value is not null there when I do a search. But when I try to pass the value to the Pager {}, it ...
2
votes
0
answers
345
views
Android Paging 3 RemoteMediator does not go to the next page
I use RemoteMediator (Paging 3) to cache files. The problem is that when I scroll to the last item, does not go to the next page ... such problems with PagingSource did not have been
interface ...
2
votes
1
answer
233
views
When i use paging 3 submitData with viewpager2 ,View flickers
When i use paging 3 submitData with viewpager2 ,View flickers.
But when i change ViewPager + FragmentStatePagerAdapter replace ViewPager2 + FragmentStateAdapter,it works well.
This is my code:
class ...
1
vote
1
answer
530
views
Calling refresh method on paging data in jetpack compose not working correctly
I'm using below paging source implementation to fetch data from network and observing it in composable via collectAsLazyPagingItems(). However, when calling refresh() method on this LazyPagingItems, ...
0
votes
0
answers
127
views
Lagging issues in Pagination with Nested Scroll view - Android
I am fetching data from my API using Retrofit library. The data is videos which are displayed in recyclerview.I am trying to implement infinite pagination in recyclerview but facing lagging issues ...
1
vote
0
answers
46
views
Android Jetpack:How to combine the Paging with Room
I'm using Paging3. And I have a local database, here is a DAO function.
public PagingSource<Integer, Item> getPagingItems();
I want to know, how to sse this PagingSource to display data to ...
1
vote
0
answers
41
views
Paging3 When Room data changed
DataSource.class
@NonNull
@Override
public ListenableFuture<LoadResult<Integer, AccountBookItemReListParent>> loadFuture(@NonNull LoadParams<Integer> loadParams) {
Integer ...
2
votes
0
answers
522
views
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 ...
0
votes
0
answers
24
views
Android Paging, How to page by time order
I'm using Room Database. And I want to use Paging to get data from the database. These data is sorted by time and I want to know how to page them by time order?
Such as
page 1:2021-12-12,
page 2:2021-...
0
votes
0
answers
52
views
I am using mvvm and I want to pass an id through intent to my retrofit function in my paging source class
I want to pass an id which is coming from intent to my retrofit function in paging source class which is part of android jet pack paging. someone please tell me how can I do this. A detail help would ...
0
votes
1
answer
903
views
Android Paging 3 - get list of data from PagingData<T> object in Jetpack Compose
I have the same question as asked in this StackOverflow question, but for Jetpack Compose.
How can we get a list of items in Jetpack Compose when you're using Paging3 with LazyVerticalGrid, As using ...
1
vote
2
answers
1k
views
Android Paging 3 library loading infinitely without scroll with Jetpack Compose
I'm attempting to make a paged list of books using Jetpack Compose and Android's Paging 3 library. I am able to make the paged list and get the data fine, but the load() function of my paging data ...
3
votes
2
answers
1k
views
Android Paging 3 library PagingSource invalidation, causes the list to jump due to wrong refresh key (not using room)
Since I'm currently working on a Project with custom database (not Room), I'm testing whether we could use the Paging 3 library in the Project.
However, I run into the issue, that if you make changes ...
2
votes
0
answers
301
views
Paging 3 emits new data, scrolling up
I have an issue, similar to the one described here. I have a master and detail flow, where the first has a list of items, obtained through Pager, using RemoteMediator. When navigating to the detail ...
0
votes
3
answers
108
views
Could not get unknown property 'implementation' for object of type Dependency
Hello there after adding dependency of paging
val paging_version = "3.1.0"
implementation("androidx.paging:paging-runtime:$paging_version")
I'm getting this error
Could not set ...
1
vote
0
answers
130
views
Android Paging 3 - cache data in Repository object
I am using Paging 3 in Fragments as below (paging data is loaded from network):
viewLifecycleOwner.lifecycleScope.launch {
data.pager.flow.collectLatest { pagingData ->
...
1
vote
1
answer
256
views
Paging 3 - Use cached data only if no internet, else do API requests
I tried to use RemoteMediator to fetch data from an API and cache the response, and generally it works great.
I need something a bit different than the normal behaviour. by default it seems it ...
4
votes
2
answers
890
views
Updating Paging 3 alpha to stable cause indexing issue Android
Hey I am using Paging 3 library with ViewPager 2. In which it loads unlimited data.
implementation "androidx.paging:paging-runtime-ktx:3.0.0-alpha07"
DataSource.kt
package com.example....
1
vote
2
answers
1k
views
Android Paging v3 with just local Room database: how do I scroll to specific position in a paged list?
I'm not sure if this is the correct use case for Paging v3 but here goes.
All my data is in a local Room database (no network calls, no APIs). I have a potentially large data set of todo-lists (one ...
0
votes
1
answer
694
views
How to call different api resource from paging source or remote mediator Kotlin
Hey I want to call two different api for my Paging Library 3. I want to ask what is best suit for me to use Paging Source or Remote Mediator?. What is the use case of both? Can someone please explain ...