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 Answer
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
1 Comment
Plamen Nikolov
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 :)