How to detect distance between two taps in Android?

131 views Asked by At

I have a custom gesture listener (inheriting from GestureDetector.SimpleOnGestureListener) created to detect double tap over a view.

The problem I'm having is that if I put the two fingers on the screen, that's detected as a double tap sometimes.

I want to consider it a double tap only if distance between the two taps is small. Right now I accidentally run the logic for double tap in random situations and that's a pain in the ass from user point of view

0

There are 0 answers