Questions tagged [android-paging-library]

189 questions
2
votes
0 answers

Paging LoadRange Not getting called after data invalidate in done

I had a issue with PositionalDataSource, were loadRange not getting called once i invalidate the data source, this issue happens only if i add the item decoration for my recyclerview for sticky header Without item decoration for recyclerview works…
Raj kumar
  • 153
  • 4
  • 13
2
votes
1 answer

RecyclerView with multiple view types and paging library with boundary callback

I have a project in which I want to show multiple Items ( Image, Text, Video etc.) to the user. I am aware of how multiple view types work for the RecyclerView. In my project, I have included most of the recommended Android Architecture…
2
votes
1 answer

How to maintain same DataSource for List,Filter and Search in Android Paging Library

I am having activity that displays list of items and also having filter and search option. I am displaying the items using android paging library. First time the List of items will be loaded its working fine when I am Scrolling to bottom next set of…
2
votes
1 answer

dataSource.inValidate() not working Paging library

I am using Paging library with MVP architecture. The dataSource is created in the interactor and I am trying to invalidate the dataSource in the Fragment as shown below. MyFragment class MyFragment : BaseFragment(), MyView…
2
votes
0 answers

How to refresh selected item In paging library

I am using the android paging library to show a list of posts in the recycler view, my data source loads data from inMemory list which I add and remove from it then invalidate the data source to refresh the PagedListAdapter, everything is working…
2
votes
1 answer

How to use a specific query in Retrofit with Android?

I have an API interface which has two overloaded methods: public interface Api { @GET("movie/now_playing") Call getMovies(@Query("page") int page); @GET("search/movie") Call getMovies(@Query("query") String…
1
vote
1 answer

Load next data when on click of button using the Paging 3 library for Compose

Currently Paging library handles when to load the data automatically when a user scrolls down. But what if you want to give the user full authority for when they want the next page of data to be loaded i.e when button is clicked show next page of…
1
vote
0 answers

Test Room db Dao that return Paging Source, it freeze at differ.submitData(it)

I am trying test room dao that return paging source but it does not work , it freeze at the adapter or sometimes it returns null val differ = AsyncPagingDataDiffer( diffCallback = MyDiffCallback(), updateCallback =…
1
vote
0 answers

Adding query parameter to Paging 3: Java

I am implementing Jetpack Paging 3 library for my recyclerview, which gets data from API. My API also has one more filtering parameter on top of page parameter.I want to set value for that paramenter from Fragment when some buttons have clicked. As…
Jakhongir
  • 112
  • 1
  • 7
1
vote
1 answer

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 createProductListPager(pagingSource:…
Nico
  • 2,570
  • 1
  • 9
  • 17
1
vote
1 answer

androidx.paging.LoadState$NotLoading cannot be cast to androidx.paging.LoadState$Error | PagingCompose

Event Handler pagingFLow.apply { when { loadState.refresh is LoadState.Loading -> {} loadState.refresh is LoadState.NotLoading -> {} loadState.append is LoadState.Loading -> { item {…
1
vote
1 answer

Did you forget to call Flow>.cachedIn(coroutineScope)?

How to fix IllegalStateException: Attempt to collect twice from pageEventFlow, which is an illegal operation. Did you forget to call Flow>.cachedIn(coroutineScope)? Code: import androidx.lifecycle.SavedStateHandle import…
1
vote
1 answer

How to clear adapter when new paging data is submitted?

I have a simple paginated search that queries the server as the user types: ViewModel: private val searchTextStream = MutableStateFlow("") val itemsStream: LiveData> = searchTextStream .debounce(Duration.milliseconds(400)) …
1
vote
1 answer

How to add multiple item in PagingData of paging 3 library android?

I would like to add some item in current paging data which already contains items. And shown in the list adapter. I have tried to insertHeaderItem. But, when adding second item. Header is getting replaced by second item. I want to keep all item in…
1
vote
1 answer

How to insert item at a position using android Paging 3

I am loading items from API using the Paging 3 library. I would like to add an item to a specific position in the recyclerview. If I am using normal adapter I would just use mArrayList.add(position, item); notifyItemInserted(position); But I am…
Martin Mbae
  • 1,108
  • 1
  • 16
  • 27