Use the GestureDetector
and SimpleOnGestureListener
, use onFling()
to determine the distance between the user the finger path from the first touch to release using .getX()
and getY()
from each MotionEvent
and do nothing for x > SOMEMAXVALUE
and y > SOMEMAXVALUE
. Hope you find your way.
source share