1

i have an sqlite table with 2000 records. I need to show this records in listview. How can i load them dynamically? For example when i start an activity i want to fill the whole screen with data - and no more. When i begin scrolling, i want to add additional records at the bottom of the list. So as much as i scroll the more records i get. I know i have to make request to the database each time i scroll because i can not load all data in the memory. I think there was something similar with content resolver, but i can not find it. Any ideas?

1
  • you mean like some feeds reader (FB, Twitter, and Gmail app ?) Commented Jun 17, 2011 at 14:41

1 Answer 1

1

This may help? http://codehenge.net/blog/2011/06/android-development-tutorial-asynchronous-lazy-loading-and-caching-of-listview-images/

Although youd switch where you get the info from...i.e. your database

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

1 Comment

Something similar. This solution is a little useless because the guy here loads all records from internet and put them in arrayList and after that loads the imags. Using this way, the listView knows the size of the elements. You have arrayList with data, but with no images. I am looking for something different. I can not load all records in arrayList.So, the list view do not know how much records i have and can not "ask for more". But this is a good beginning of another idea. 10x :)

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.