Reputation: 44228
I want to implement functionality where a listview loads a set number of views, but at the end of the scrolling it has a spinner in that view, while it loads more views
the official android twitter app has something like this, where it shows you old messages from your timeline but at the bottom of the list it will load more after running a spinner. you can still scroll up and down while this thread is happening without breaking anything
how would this be done? insight appreciated
Upvotes: 1
Views: 1113
Reputation: 2511
i think by spinner u mean blocking screen ? anyways what u need is pretty common, just search for listview implementation in android here is one of the link i still had: http://blog.zjor.ru/2010/12/loading-list-data-asynchronously-in.html
also check this if u really want to go to that extent ;)
https://github.com/commonsguy/cwac-endless
Upvotes: 2
Reputation: 39406
basically, it would probably be something like:
Load some data (use a limit)
When you enter the bindView of your last element, change your limit (may be by joining the cursor to another one)
Upvotes: 1