简体   繁体   English

ProgressDialog覆盖整个屏幕

[英]ProgressDialog covers whole screen

I'd like to show a ProgressDialog which covers whole screen. 我想展示一个涵盖整个屏幕的ProgressDialog。 I mean when the dialog is showing, the UI shouldn't be touched or clicked or interacted. 我的意思是,在显示对话框时,不应触摸,单击或交互UI。 How to create a dialog like that? 如何创建这样的对话框?

That is already done by a normal ProgressDialog. 正常的ProgressDialog已经做到了。
Just add myProgressDialog.setCanceledOnTouchOutside(false); 只需添加myProgressDialog.setCanceledOnTouchOutside(false);
this prevents the dialog from closing when the user clicks on the screen. 这样可以防止在用户单击屏幕时关闭对话框。
myProgressDialog.setCancelable(false); prevents the Dialog from closing on "back"-key 防止对话框在“返回”键上关闭

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM