I'm using GestureDetector to change the view. It works, but how do I make so that it only changes when the user swipes from Left-to-Right or Right-to-Left and not Down-to-Up... Thanks in advance
Asked
Active
Viewed 776 times
0
-
There is an existing answer for you. Please visit [here](https://stackoverflow.com/questions/4139288/android-how-to-handle-right-to-left-swipe-gestures) – John Le Sep 10 '17 at 03:21
1 Answers
0
you can set the gesture handling rule to a minimum absolute difference between the X values and a maximum absolute difference between the Y values, you can also add a rule to get the gesture only if the X difference is bigger than the Y difference.

Androidz
- 401
- 1
- 6
- 19