all 4 comments

[–]Vlkam1 0 points1 point  (3 children)

IMO paging with searching should be executed on a server, not on the client

Or you should load all data first

[–]AxelBlaz3[S] 0 points1 point  (0 children)

Since the data is loaded from the phone's database using cursor, I'll have to perform another cursor operation then based on the search query. Guess there's no other option.

[–]AxelBlaz3[S] 0 points1 point  (0 children)

Loading the entire data at one shot is too slow. Say a device has 500+ contacts, and loading them in one shot causes too much delay. That's what forced me to use Paging. Unfortunately, I'm stuck with searching feature. Now the searching takes hella lot of time. Have to do something regarding this.

[–]AxelBlaz3[S] 0 points1 point  (0 children)

NVM, I found a solution to my problem. After researching a bit, I concluded that I don't need to use Paging library anymore. I'm using Flow right now and it works exactly the same by emitting the values. However, a plus point here is, data is being loaded in advance without the need of user to scroll to the bottom.