Cancel onTouchEvent when GestureDetector's onDoubleTap triggers

310 views Asked by At

A View for freehand writing implements onTouchEvent for the drawing operations.

Besides, a GestureDetector recognises double tap events to wipe the drawing. However, when the double tap occurs, onTouchEvent triggers an ACTION_UP, which draws an unwanted point on the view.

In iOS I handled these kind of problems with the touchesCancelled method, is there something similar in Android?

1

There are 1 answers

0
vitil On

I solved by handling onDoubleTapEvent instead of onDoubleTap.