thorbenprimke / realm-recyclerview

A RecyclerView that is powered by Realm and lots more
555 stars 151 forks source link

how to fire loadmore after fetching and showing every 100 records from realm #95

Closed monajafi closed 5 years ago

monajafi commented 7 years ago

Example project fetches and shows the whole database first then loadmore get fired . How about this scenario: 1- fetch first 100 records from database and show it 2- then fire loadmore after loading every 100 records

Pasupatirajesh commented 7 years ago

I also have an issue with the above mentioned scenario

Also, onLoadMore does not get fired as I scroll to the bottom of my Recycler view. I would love to have a way by which I could load 100 records received as JSON into the database and be able to show only the first 25 after which, I can load more as I keep scrolling to the bottom of the RecyclerView. Is there a way to implement this ? Currently, I am able to load 100 records onto the database and all of which gets queried and loaded on to a RealmResults, which then gets passed to the RealmBasedRecyclerViewAdapter.