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.

Overview:-

Many apps work with large sets of data, but only need to load and display a small portion of that data at any time. An app might have thousands of items that it could potentially display, but it might only need access to a few dozen of them at once. If the data is stored or synchronized with a remote database, this can also slow the app and waste the user's data plan

While existing Android APIs allowed for paging in content, they came with significant constraints and drawbacks:

  • CursorAdapter makes it easier to map database query results to ListView items.
  • AsyncListUtil allows for paging position-based data into a RecyclerView but doesn't allow for non-positional paging, and it forces nulls-as-placeholders in a countable data set.

Classes:-

The Paging Library provides the following classes, as well as additional supporting classes:

  • DataSource: Use this class to define a data source you need to pull paged data from.
  • PagedList: This class loads data from a DataSource. You can configure how much data is loaded at a time, and how much data should be prefetched, minimizing the amount of time your users have to wait for data to be loaded.
  • PagedListAdapter: This class is an implementation of RecyclerView.Adapter that presents data from a PagedList.
  • LivePagedListProvider: This class generates a LiveData from the DataSource you provide.
524 questions
0
votes
1 answer

how to pass button click event to Activity in PagedList in Android?

I'm trying to adopt PagedList to my app. One of the functionality I want is the ability to handle button click event within list item. I was thinking to utilize ViewModel to listen for the click event and taken from the example…
user1865027
  • 3,505
  • 6
  • 33
  • 71
0
votes
0 answers

Recycler View is putting items always in the Top

I am having a problem where Each time the system updates from the service, the new items are placed before the item that the recycler is at. This means that it will always be at "the end". I am using the PagedList.BoundaryCallback library and I…
0
votes
1 answer

Jetpack paging library return all data

Currently, I'm trying to implement the paging library provided by android jetpack. But I having some troubles when getting the data from DAO. Actually, when I get the data, the PagedList have the size of all the rows in the table! Here my…
0
votes
1 answer

Paging Library Android - Returning no results

I'm working in a project (using Android's Room Persistence Library) where i want to implement the recent Paging Library by Google. I have tried to approach this without using it, and all is working fine, but when I try to use it by following some…
Daniel Beleza
  • 389
  • 1
  • 15
0
votes
1 answer

Implementation android.arch.paging:runtime:1.0.0

After adding the library to gradle: implementation 'android.arch.paging:runtime:1.0.0' With the PagerListAdapter in the project, it produces an error: "Add library 'Gragle: android.arch.paging:runtime-1.0.0' tо classpath"
0
votes
2 answers

duplicate entry: android/support/v7/recyclerview/extensions/ListAdapter.class

RecyclerView 27.1.0 and android.arch.paging 1.0.0-alpha4-1 both contains android/support/v7/recyclerview/extensions/ListAdapter.class Does any body know how to exclude ListAdapter.class from paging component?
0
votes
1 answer

Android Paging Library when to request more items when doing an endless scrolling

How to know when to request the server for more items using the new android Paging Library of Architecture Components? For example, if I want to implement an endless scrolling where the data is loaded from server how do I know when I have to request…
0
votes
1 answer

Custom TiledDataSource with paging library

I tried to implement custom TiledDataSource for using with paging library. When I used LivePagedListProvider like returns type for my Dao method it worked fine (after table items updating - ui updated automatically). @Query("SELECT * FROM " +…
-1
votes
1 answer

I can't show my data from the API? Kotlin Android

First one it's my repo : https://github.com/Berkayszk/FiWoApp I am getting my data using retrofit and using paging adapter. When I want to show my data using my recyclerView in my MovieFragment, I see that no data is coming. What is the reason for…
-1
votes
1 answer

How to use Network Bound Resource with Paging 3?

I want to use network-bound resources meaning room caching with paging 3. If someone has done it please post your answer thanks.
-1
votes
1 answer

Is there any difference between androidx paging and android-arch paging?

I have to set up pagination for my android project. But I'm a little bit confused since there are two different libraries with same class names AndroidArchitectureComponents and AndroidX. and in the documentation too I didn't found differences,…
-1
votes
2 answers

Paging Library Filter/Search PageList

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 Countries by Name. How can i filter the results from the Paging library to…
-1
votes
1 answer

Does FirestorePagingAdapter fetch document in pages or all document at once and then apply paging?

I am using Firestore to store my data. Now I want to fetch perticular collection from it. I am using FirestorePagingAdapter to do this. Scenario: I am querying Firestore to fetch all documents from perticular collection, lets say posts(collection)…
Shendre Kiran
  • 157
  • 2
  • 8
-3
votes
0 answers

What paging library do you use with compose in android development?

I tried to use google paging library but it is buggy. Especially jumping bug is annoying. https://issuetracker.google.com/issues/235319241 I think that it is not ready for usage in professional app in the current state. Do you use some other third…
jydtaerg
  • 1
  • 1
1 2 3
34
35