开发者

android activity block user interactions

开发者 https://www.devze.com 2022-12-28 00:22 出处:网络
How can I temporarily block al开发者_如何学Cl user interactions with the views of an activity ?

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

精彩评论

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