2

I have an imageswitcher as the only component on the screen. I want to capture the swipe gesture and click event separately for it. But it is not able to get the events separately. If I set the onclicklistener method for imageswitcher object then it always fires onclick method even if I have swiped.

Can someone let me know the workaround to this?

thefrugaldev
  • 1,619
  • 4
  • 18
  • 36

1 Answers1

1

If you return true from your onFling(…) it should consume the event and stop propagation.

Ref from this question: android - giving onTouch priority over onClick

Community
  • 1
  • 1
androidExplorer
  • 126
  • 1
  • 6