88

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

zaPlayer
  • 737
  • 5
  • 23
Eno
  • 10,300
  • 18
  • 51
  • 83

2 Answers2

216

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 :)

synic
  • 25,374
  • 17
  • 102
  • 140
  • 14
    ProgressDialog is discouraged. According to the link you posted: "Avoid ProgressDialog. [...] If you need to indicate loading or indeterminate progress, you should instead follow the design guidelines for Progress & Activity and use a ProgressBar in your layout." – Ilya Kogan May 07 '13 at 20:14
  • 3
    Currently, ProgressDialog has been taken out of the docs and the solution does not appear to be viable any longer. – JcKelley Oct 29 '14 at 13:50
  • 3
    To dismiss the dialog, use `dialog.dismiss();` – JohnTheBeloved Dec 11 '19 at 20:12
  • ProgressDialog is now deprecated, check this answer: https://stackoverflow.com/a/45351516/5090196 – omzer Aug 07 '20 at 14:13
33

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


Update

Thay have renamed the component to Progress Indicators now.

The new link for reference is: https://material.io/components/progress-indicators/android

Rafael Miceli
  • 1,624
  • 5
  • 20
  • 31