Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a row to a ListView that displays "Loading" while information is downloaded. Like in the Market

I've tried, but have had no luck trying to find this answer elsewhere.

I want to add a row to the bottom of my listview that displays "Loading..." and maybe a spinning progress indicator.

My program already loads additional information into the listview once the user scrolls to the bottom. But I want the user to be able to see that the program is indeed loading something.

Example: If you go to the android marketplace and scroll to the bottom of one of the lists, the last row will say "Loading...". Then once the data is loaded, that bar is replaced with the first item of the new data.

Sorry, it's a little hard to describe. I am NOT trying to add a footer to the bottom of the list view. I want it to be an actual item in the listview.

like image 747
user577139 Avatar asked Nov 05 '22 04:11

user577139


1 Answers

Take a look at the following library: https://github.com/commonsguy/cwac-endless

It does exactly what you're looking for and it's also very easy to use.

I've used it myself on one of my apps: WorldSpeak. Take a look on it to see the result.

like image 156
Jonas Alves Avatar answered Nov 11 '22 09:11

Jonas Alves