Android Question trapping swipe events on top of click events

sorex

Expert
Licensed User
Hello,

When you have a panel with labels/buttons in it that have their own click event how would you trap a swipe event that happends above the label/button?

I could add it to each panel where the labels/buttons are in but that's kind of a nasty workaround.

How would you solved it?
 

Cableguy

Expert
Licensed User
Detect the touch_down and touch_up events, if the distance (x,y coordinate) aren't too wide, its a touch, so ignore, if the distance is big, its a swipe, act on it
 

sorex

Expert
Licensed User
I know that and I added it to the button panels like that.

It works fine but I wondered if there was another method.
 
Top