Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top