Вопрос

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...

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top