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

发布于 2024-08-26 21:58:57 字数 63 浏览 4 评论 0原文

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满意归宿 2024-09-02 21:58:57

它是一个 ProgressDialog,带有 setInminated(true)。

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

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

不确定的进度条实际上并不显示进度条,它显示一个旋转的活动圆圈。我相信你知道我的意思:)

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

倾城°AllureLove 2024-09-02 21:58:57

今天情况发生了一些变化。

现在我们避免使用 ProgressDialog 来显示旋转进度:

在此处输入图像描述

如果您想在应用程序中添加旋转进度,您可以应该使用活动指示器:

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


更新

现在已将该组件重命名为进度指示器。

新的参考链接是: https://material.io/components/progress-indicators/android

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文