开发者

android activity block user interactions

How can I temporarily block al开发者_如何学Cl user interactions with the views of an activity ? (Other than calling the setEnabled method on each view)


If you need to block user interaction while performing some task in the background you can use a ProgressDialog.

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


As Stefan allready wrote. As long as you are showing a ProgressDialog the user can't interact with the views in your activity. If you set the dialog to cancelable false even the back button is deactivated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜