Anupriya
Anupriya

Reputation: 1693

Paging Library with database as well as Network Request

I have db with 1000's of records. I have to implement pagination so as to get 30 records at a time from db on recycler scrolling.For that I read somewhere android has an option of Paging library with ROOM. But I have to load data from Api also in my adapter. How can I use PAgedListAdapter to populate data from database as well as API.

Upvotes: 0

Views: 1240

Answers (1)

seyed Jafari
seyed Jafari

Reputation: 1265

you can use BoundryCallback to get notified on certain points of your DB list

here is a sample from Google link

here is my playground with paging link

Upvotes: 2

Related Questions