I am trying to make a button that will execute when we swipe over it. (using java in android studio). just like we can do it on the keys of a piano app. How can I do that?
Asked
Active
Viewed 183 times
1 Answers
1
You might be looking to implement the onFling() method:
- Drag: Fine gesture, slower, more controlled, typically has an on-screen target
- Swipe: Gross gesture, faster, typically has no on-screen target
- Fling: Gross gesture, with no on-screen target
This might also be of some help to you: Swipe listeners in Android

alex
- 26
- 2