I'm trying to implement an endless scroll view (until the repository returns []), I've been reading and looking examples but they are for Room
database, although I want to do it also with Room
but first of all I'd like to have the paging with Retrofit
my goal is to ask for a bunches of 10 items for instance but I'm not getting succeed, I've read that I would have to use PagedList
but it's very new to me, could anyone of you provide me an example or a pseudo example of how to do it? My call to endpoint is like this :
https://api.example.com/pews/{string}/books?per_page=10&page=1
The problem is that my response is not returning in the json something related with the page, or maximum of pages, I just need to try until it returns empty list, also the thing is that I'm used to work with MVP instead of MVVM, but perhaps is easier to do it with MVVM, also I'm following the clean architecture UI - Presentation - Domain - Data.
I'd go for MVP first, since I can go straight forward but if it's easier with MVVP I just change the Presenter to ViewModel and do some changes and that's it.
the purpose of paging on my app is to have an endless scroll view, that every-time I'm arriving to the end it loads 10 items more.