Questions tagged [android-paging-3]

The Paging library helps you load and display pages of data from a larger dataset from local storage or over network.The latest stable release is Paging 3.0.1

324 questions
2
votes
0 answers

Paging 3 - Use Network data as primary source and local data as addition

I want to load network data first and combine it with data from my local room db. So in that way, I would always present the newest state of the backend to my users (since its always requesting the network first) and update my ui when there are some…
2
votes
2 answers

Inifinite loop loading items with paging3 and Jetpack compose UI

I have a simple app with a single screen, displaying movies in a Composable items list: I use Android's paging3 library in order to load the movies page by page, and things seem to be working well: @Composable fun FlixListScreen(viewModel:…
d4vidi
  • 2,407
  • 26
  • 27
2
votes
0 answers

How to check if PadingData is empty in ViewModel?

I'm using Paging 3 with a Room database in my Android app. Currently, I have a sealed class which contains the Loading, Empty, Error states, and a Success state which receives the retrieved PagingData list data. In the ViewModel, I…
2
votes
2 answers

Unable to mutate the list loaded by Paging 3 in jetpack compose

I have an activity that has a list of items loaded through the Paging 3 library. The list screen is designed by using jetpack compose and the list of items is shown in a Lazy column. Clicking on any list item would take me to a detailed screen and…
2
votes
2 answers

Android RemoteMediator calls API again and again

I have created a remote mediator which gets movies from API call and adds it to database which is then used as a source to load the data on screen. It is pretty cliche implementation done same as Google developers video of paging3 from YouTube,…
Saneen K P
  • 303
  • 1
  • 8
2
votes
1 answer

Infinite loop in PagingSource when response is empty using Paging 3 library and Retrofit

I'm using Paging 3 library and Retrofit to get data. My problem is that when the API response retrieve an empty list, instead of print nothing, it causes an infinite loop in my PagingSource class. How can I stop the loop? I want the possibility to…
HeraGonz
  • 315
  • 1
  • 9
2
votes
1 answer

Reusing the RecyclerView adapter so as to avoid unnecessary API call

I have a recycler view that uses paging 3 inside a fragment. When an item on it is clicked, I need to show a bottom sheet with the exact same recycler view in a more elaborate way. I want to try and reuse the same recycler view adapter so that more…
2
votes
0 answers

Paging3 with RemoteMediator stuck in page 3 and constantly calling APPEND even when idle

I am trying to use Paging 3 for my list. At first i use the PagingSource with only network data source and it is working properly. Then i tried to implement offline caching with RemoteMediator, but i couldnt get it work. There is 2 problem i…
wiryadev
  • 1,089
  • 1
  • 11
  • 33
2
votes
1 answer

Android searchview filter in recyclerview pagingDataAdapter with Paging3 is not updating the data

I am trying to search a value from database with the search filter. but not updating the searched values in adapter. Note: loading the data using Paging3 library. private val mDiffer: AsyncListDiffer = AsyncListDiffer(this,…
2
votes
1 answer

PagingDataAdapter.refresh() not working after fragment navigation

I am using PagingDataAdapter in one fragment to show user activity. in fragment class level, private var activityAdapter: ActivityFeedAdapter? = null in onCreate() I am initializing before use as, activityAdapter = initAdapter() also in…
Willey Hute
  • 939
  • 13
  • 18
2
votes
1 answer

Paging 3 refresh in the middle

I'm having a problem with refreshing the paged data and I'm not sure how I need to set the refresh key so it works correctly. The docs aren't clear at all. I have this base class for offset paging, so it goes 0-40, 40-60, 60-80, and so on. And that…
Syntey
  • 147
  • 1
  • 15
2
votes
0 answers

Paging 3.0 handle Api and Network error using clean architecture

I am following uncle bob clean architecture to some extent and for that I have to implement UseCase Interactor and Repository pattern for Implementing Paging 3.0. I haven't find any example that handle network response code and Api Error with…
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
2
votes
0 answers

Viewpager 2 causing index issue when opening fast

I am working in ViewPager 2 with Paging 3 library in my application. When I am opening my view pager screen again and again i.e. Open the screen and close it and again so on and so. The first few times it opens the correct page number but sometimes…
2
votes
2 answers

Transforming a flow of PagingData from paging3 into a StateFlow of PagingData

I am learning pagination using paging3 from the jetpack library. I am making a call to an api to receive a list of articles. I've noticed that the result received after making the call in the repository using the Pager is a flow of PagingData…
2
votes
1 answer

How to fix java.lang.AbstractMethodError in android?

I switched from a recyclerview to using an epoxy list controler to display the results of a web response in my application. My response is handled in the right way and is transfered in my model class. Unfortunately after I received the response I…
Felix m
  • 59
  • 1
  • 10