我怎样才能让一个ProgressDialog的后退按钮而不是由一个屏幕点击要取消? [英] How can I make a ProgressDialog be cancelable by the back button but not by a screen tap?
本文介绍了我怎样才能让一个ProgressDialog的后退按钮而不是由一个屏幕点击要取消?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想作一个 ProgressDialog
取消按后退按钮而不是由一个屏幕点击。目前我使用 setCancelable(真)
。
I would like to make a ProgressDialog
cancelable by the back button but not by a screen tap. Currently I use setCancelable(true)
.
然而,在一些较新的设备屏幕上的一个水龙头也取消 ProgressDialog
。我想禁用屏幕点击的动作,而 ProgressDialog
显示。
However, in some newer devices a tap on the screen also cancels the ProgressDialog
. I'd like to disable the screen tap action while the ProgressDialog
is shown.
推荐答案
使用<一个href="http://developer.android.com/reference/android/app/Dialog.html#setCanceledOnTouchOutside%28boolean%29">setCanceledOnTouchOutside(false).
这篇关于我怎样才能让一个ProgressDialog的后退按钮而不是由一个屏幕点击要取消?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文