What\'s the best way to disable the touch events for all the views?
This piece of code will basically propagate this event to the parent view, allowing the touch event, if and only if the inProgress
variable is set to false
.
private boolean inProgress = false;
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (!inProgress)
return super.dispatchTouchEvent(ev);
return true;
}