android-clean-architecture-boilerplate icon indicating copy to clipboard operation
android-clean-architecture-boilerplate copied to clipboard

Question: What would it be to build a pagination?

Open amadeu01 opened this issue 7 years ago • 3 comments
trafficstars

On the screen that shows the members

image

If I want to fetch the network on the pagination event, like while the user is scrolling. What would it be the best aproach?

amadeu01 avatar Nov 01 '18 11:11 amadeu01

i have the same question

acrrono avatar Nov 07 '18 04:11 acrrono

@amadeu01 @acrrono I have the same question!

my solution is in the domain layer you can add some parameters, I just add page parameter to the use case class along to remote and load more when reached the end of recycler view.

arohim avatar Mar 15 '19 04:03 arohim

I think there is no easy answer to this problem for now and it won't be.

For now - personally - I am observing Android Components paging library as it seems promising for the nearest future, but it might affect few modules in this exact implementation of clean architecture, so it definitely won't be not good if you want make multi-platform app

Check: https://github.com/googlesamples/android-architecture-components

@arohim solution is pretty fine and similar to a solution implemented in GithubSample in the repository.

piotrek1543 avatar Apr 22 '19 20:04 piotrek1543