Is there a simple way to disable a user interacting with an activity. To be done when there is an action running (and a spinning progress bar in the title bar)
EDIT:
If you need to disable event processing for a period of time (for instance, while you run an animation, show a waiting dialog), you can override the activity's dispatch functions.
To disable touch/clicks on any buttons, add these members/functions to your activity:
protected boolean enabled = true;
public void enable(boolean b) {
enabled = b;
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
return enabled ?
super.dispatchTouchEvent(ev) :
true;
}
Then just call enable(true/false)
when you need to disable and enable the activity's normal event handling.