Question

I want to suppress the touchscreen input in my App sometimes.

I tried this:

public boolean dispatchTouchEvent(MotionEvent ev) {
    super.dispatchTouchEvent(ev);
    return true; // or false
}

But it made no difference...

Was it helpful?

Solution

Do not call through to to your Super, just return.

This overridden method is so that you can add in your own functionality, but sending it to the super, still passes the touch on to the system to handle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top