MarkoMilos / Paginate

Library for creating simple pagination functionality upon RecyclerView and AbsListView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReInitialize the pagination

prathameshtal opened this issue · comments

Hi Marko
I want to reinitialize the pagination when I return to the top position. And I want to call loadMore items method freshly to load new data. Can you tell me how to do that?

Thanks for a great plugin.

@prathameshtal I don't think that this has anything to do with Paginate directly. You will need to "re-setup" you adapter at some point (when scrolled to the first item - aka top) in terms of removing all other pages (items) and keeping only the first page of data. You can do that manually e.g. by adding a custom method to the adapter.
Use the paginate callbacks to indicate that there is more data to load once when list is scrolled to the bottom. Notice that Paginate doesn't have any logic for counting pages. You do not need to reset state or something like that.

@MarkoMilos : Thanks, I have completed it.