Android:如何创建模式进度“轮"覆盖? [英] Android: How to Create a Modal Progress "Wheel" Overlay?

查看:65
本文介绍了Android:如何创建模式进度“轮"覆盖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在视图上显示一个模式进度转轮".

I would like to show a modal progress "wheel" overlay on my view.

ProgressDialog即将关闭,但我不希望对话框的背景或边框.

The ProgressDialog comes close, but I do not want the dialog background or border.

我尝试设置对话框窗口的背景绘制:

I tried setting the background drawable of the dialog window:

this.progressDialog = new ProgressDialog(Main.this);

this.progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
this.progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
this.progressDialog.setCancelable(false);
this.progressDialog.setIndeterminate(true);

this.progressDialog.show();

但无济于事(即看起来仍然与没有... setBackgroundDrawable代码相同).

but to no avail (i.e. still looks the same as without the ...setBackgroundDrawable code).

推荐答案

您是否已签出此

Have you checked out this tutorial? At the end of the page it talks about how to create a custom dialog, and that might help you put a spinner progress dialog box with your own backgrounds.

这篇关于Android:如何创建模式进度“轮"覆盖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆