I tried implementing 2 finger swipe using onFling
method of SimpleOnGestureListener
. However,I found that SimpleOnGestureListener
doesn't support two finger touch.
How can I work it out ?
I tried implementing 2 finger swipe using onFling
method of SimpleOnGestureListener
. However,I found that SimpleOnGestureListener
doesn't support two finger touch.
How can I work it out ?
My Solution works, but its quite ugly to use a public static int to count how many fingers there are. i had to set fingercount back to one after i flinged with two fingers because i couldnot get the action_pointer_down for one finger anymore... i dont know why... but this solution would also work for more fingers... hope someone can use it in the feature
You could try to use OnTouchListener with MotionEvent.ACTION_POINTER_DOWN like this:
Here is a tutorial which explains how to do it if you need more details. I hope it will help.
I had made a library some time ago that makes implementing 1/multi finger swipes very easy.
You can find more detailed documentation of the API here A sample implementation can be found here
The part that you want to look at is