Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OnGestureListener
override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float)
: Boolean {
return true
}
override fun onTouchEvent(event: MotionEvent): Boolean {
return if (gestureDetector.onTouchEvent(event))
true
else
super.onTouchEvent(event)
}
override fun onDown(event: MotionEvent): Boolean {
return true
}
override fun onSingleTapUp(e: MotionEvent): Boolean {
return false
}
override fun onFling(arg0: MotionEvent, arg1: MotionEvent, arg2: Float, arg3: Float)
: Boolean {
return false
}
override fun onLongPress(e: MotionEvent) {}
override fun onShowPress(e: MotionEvent) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.