문제

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