How to create loading dialogs in Android?


Question

Those dark spinning progress dialogs in the Amazon and Engadget apps - are those standard in Android?

1
80
7/1/2015 10:01:43 AM

Accepted Answer

It's a ProgressDialog, with setIndeterminate(true).

From http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog

ProgressDialog dialog = ProgressDialog.show(MyActivity.this, "", 
                    "Loading. Please wait...", true);

An indeterminate progress bar doesn't actually show a bar, it shows a spinning activity circle thing. I'm sure you know what I mean :)

199
3/26/2010 6:30:27 PM

Today things have changed a little.

Now we avoid use ProgressDialog to show spinning progress:

enter image description here

If you want to put in your app a spinning progress you should use an Activity indicators:

http://developer.android.com/design/building-blocks/progress.html#activity


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon