android-paging Questions

2

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.vi...

4

I have an App that fetches a list of 158 Items from an API, stores it in Room, and displays it to the user. RoomDB is the source of truth. This is the code on my ViewModel that gets the result from...

4

Solved

I am trying to implement Jetpack paging 3 library following the codelab using room database as source of truth and a RemoteMediator. The app queries the google books api but for some reason when I ...
Blaspheme asked 27/7, 2020 at 10:16

2

I migrated from Paging 2 to Paging 3 library and now I use the PagingSource to load pages of data from the server. But I have trouble understanding the getRefreshKey method that has to be overriden...
Trailer asked 28/7, 2021 at 22:20

2

Solved

I have this page which I've setUp with MVVM and pagination using RecyclerView and Pull to refresh. Clicking on some items in this RecyclerView will navigate to another fragment. My problem is when...
Courlan asked 26/12, 2019 at 10:17

4

My current problem is, that my LoadStateAdapter which shows the loading and error state, is not centered inside my recyclerview, which has a gridlayout as a layoutmanager. I didn't find anything ab...

1

I am trying to implement cursor based pagination (based on GraphQL Relay spec) using Android Paging Library 3, but I don't know how to implement getRefreshKey. This is what I've tried: data class P...

2

I am using ViewPager2 to display data that I fetch from a server and save to a Room database using the Paging 3 library. My question is, how do I navigate to a specific view pager item through code...
Umont asked 22/11, 2020 at 20:0

3

Solved

LiveData setValue should have triggered the onChanged method in the Activity, however it calls only at the first time, after when I try to make paging, it breaks and doesn't call onChanged anymore,...
Unweave asked 21/6, 2018 at 6:56

1

Solved

I have implemented LazyColumn with Paging, but I'm now trying to add sticky headers as well. The stickyHeader() function is not available inside the items() scope, so I don't see how this should wo...

2

Solved

Is background threading managed automatically with PagingData as it is with PagedList, and then returned on the main thread? From the logs below, it appears PagingData is not run on the backgroud t...

0

I have a list of data which is loading by using PagingSource. Here is my code in DAO: @Query("SELECT * FROM Transport") fun getAllTransportsPaged(): PagingSource<Int, Transport> ...

3

Solved

I am using the Android Paging Library like described here: https://developer.android.com/topic/libraries/architecture/paging.html But i also have an EditText for searching Users by Name. How can ...
Disagreeable asked 9/3, 2018 at 11:16

2

Solved

I implemented Paging using android paging library. The ViewModel returns a LiveData<PagedList<MyObject>> and I observe that in the fragment where I set the adapter and everything is wor...

1

Using paging 3.0 , I am successful in implemented it. Now I want to add search functionality to it. I simply display photo gallery along with paging functionality. Now I want to invalidate pagina...

1

I have a pagingData flow object and i want to combine it with a different flow of fused location so it will be processed accordingly with each item of the pagingdata list . val point : Flow<Poin...
Arcograph asked 18/2, 2021 at 14:59

3

I'm using the Paging library. Currently, I want to sort (using SortList) the items by the description in PagedListAdapter but I have not figured out how to do it. How to sort elements when using ...
Sollows asked 13/7, 2018 at 8:29

1

I'm using latest Jetpack libraries. Pagination3 version: 3.0.0-alpha05 Room Version : 2.3.0-alpha02 My entities have Long as PrimaryKey and Room can generate PagingSource for other than Int type. e...

1

Ignoring multiplatform advantages, is there any advantage of using room over sqldelight?
Titoism asked 26/7, 2019 at 5:22

1

Solved

I'm developing an app with clean architecture principles. I've a domain module which is a Java/Kotlin module and it hasn't android dependencies and a domainImpl module which is an Android module an...

4

Solved

I am trying to use paging library with newer versions. I am using volley to fetch my data from network. Whenever I fetch data from network, the data is fetched but when the call goes to observer th...
Helsinki asked 23/7, 2018 at 10:27

0

BACKGROUND I have a UI that shows a list of users' fullnames with a like/dislike button for each item. I am using a ListAdapter that under the hood uses DiffUtil and AsyncListDiffer APIs. The list ...

5

I have a chat-like activity where I am using a RecyclerView with a PagedListAdaper to load a bunch of messages. I'm using a PositionalDataSource to load the data. The loading it's self works fine b...
Eurystheus asked 25/1, 2018 at 8:53

1

Solved

how am I able to get the current amount of items, that my PagingData<Product> holds? The only solution I found was to call shopListAdapter.itemCount but this always returns 0. What I am tryin...
Pendulum asked 26/12, 2020 at 22:30

2

Solved

I'm trying to implement paging I'm using Room and it took me ages to realize that its all done for me 😆 but what I need to do is be able to filter search and sort my data. I want to keep it as Liv...
Glidebomb asked 6/12, 2020 at 20:19

© 2022 - 2024 — McMap. All rights reserved.