0

I implemented a gesture listener that listens to double tap and single tap events now the problem is that it is being called when I double tap the screen but it is not called when I double tap a functional view like a clickable button. Thanks for your help.

I think that the button consumes the double tap, if that is the case what should I do?

Michele La Ferla
  • 6,775
  • 11
  • 53
  • 79
Hasan B.T
  • 51
  • 1
  • 7
  • 2
    There are so many similar posts here, did you check them out? For example: http://stackoverflow.com/questions/9042522/doubletap-detection-on-android-view-component, or http://stackoverflow.com/questions/6611044/android-imageview-gesture-doubletap-not-firing – yakobom Jan 08 '17 at 10:26
  • @yakobom do you have any idea on how to bind the detector of gestures to any view , so that when I double tap a view it will respond to the double tap? – Hasan B.T Jan 08 '17 at 10:47
  • In the examples I gave it is shown how to bind it. You do not need to bind it to each view, just make sure you implement onDown as shown there – yakobom Jan 08 '17 at 11:41

1 Answers1

0

Check this site, it is a great tutorial about gestures in general, and for your case specifically it covers onDoubleTap method in step 5.

https://code.tutsplus.com/tutorials/android-sdk-introduction-to-gestures--mobile-2239

omriherman
  • 254
  • 1
  • 12