如何在 Android 中创建加载对话框?

亚马逊和 Engadget 应用程序中那些黑暗旋转的进度对话框——这些是 Android 的标准吗?

139074 次浏览

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

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