Unverified Commit 697d4896 authored by Alexander Maryanovsky's avatar Alexander Maryanovsky Committed by GitHub

Fix SimpleOnGestureListener implementation in SkikoGesturesDetector.android.kt (#725)

parent ab1d03de
......@@ -99,11 +99,15 @@ private val swipeThreshold = 100
private val swipeVelocityThreshold = 100
internal fun toSkikoGestureDirection(
event1: MotionEvent,
event1: MotionEvent?,
event2: MotionEvent,
velocityX: Float,
velocityY: Float
): SkikoGestureEventDirection {
if (event1 == null) {
return SkikoGestureEventDirection.UNKNOWN
}
val dx = event2.x - event1.x
val dy = event2.y - event1.y
if (abs(dx) > abs(dy)) {
......
......@@ -79,7 +79,7 @@ internal class SkikoGesturesDetector(
}
override fun onScroll(
event1: MotionEvent,
event1: MotionEvent?,
event2: MotionEvent,
distanceX: Float,
distanceY: Float,
......@@ -98,7 +98,7 @@ internal class SkikoGesturesDetector(
}
override fun onFling(
event1: MotionEvent,
event1: MotionEvent?,
event2: MotionEvent,
velocityX: Float,
velocityY: Float
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment