8

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use lazy loading? The list will also be searchable and filterable. Could you also point me to some nice articles that would gimme a better idea. Please do give me suggestions.

5
  • I haven't used lazy loading before, please do point to articles that might be of help to me. Commented Oct 24, 2010 at 15:29
  • Given that it is a mobile application, you should definitely not load all the entries in one go... Use something algorithm to get ONLY the relevant data perhaps using a search, or some sort of pagination support for the data to acquire data by chunks of 20 - 50 rows at a time Commented Oct 24, 2010 at 15:35
  • Any resources I can refer to @Ranhiru Cooray Commented Oct 24, 2010 at 16:32
  • @RagunathJawahar Hi. I do have the same prob. I have like 1000 items in database and wanted all the items in a listView and the list view is both searchable and filterable. What approach did u follow.? is it good to have Lazy loading.? If yes, how can i achieve search and filter on ListView adapter on lazy loading.? Commented Jan 8, 2013 at 5:58
  • Use Commonsware's endless adapter to alleviate the problem Commented Jan 8, 2013 at 11:23

1 Answer 1

6

I would like to point you to here first but I also have some experience I would like to share.

First, showing anything more than say 500 items in a list is probably going to cause users to complain (maybe not though). Users can get overwhelmed with info and it gets annoying for users to scroll to see all of the data (even with filters because some users will refuse to use them if they can scroll).

Second, the data adapter in Android is pretty smart so an adapter over thousands of items will be handled smoothly due to the way Android caches views and iterates through a result set with a cursor which is the subject of that link I pointed you to at the start of my answer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.