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.
精彩评论