Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Show progress circle like Google does in their apps

I'm using an AsyncTask to download Images for my Listview, because I dont want the download of the Images to block my UI-Thread. While the images are being loaded, I want to show an animated progress circle in the spot, where the image will be.

But I cant find an Image of the progress circle. What is the Ressource-Id? Or is there any other way? Does someone has a link to this image?

like image 679
Pascal Klein Avatar asked Dec 21 '10 21:12

Pascal Klein


1 Answers

Look at the progress bar. It can work (and it does by default, AFAIR) in indeterminate mode, which means it shows a rotating circle, like the one you are asking for. I know this is not an image, but what you can do, is to place a FrameLayout instead of the image, with progress bar as the only child. Then, once the loading of the images finishes, remove the progress bar and add the image.

like image 112
Robert Kolner Avatar answered Nov 15 '22 16:11

Robert Kolner