Fix showing reader control by long press
This commit is contained in:
@@ -7,7 +7,7 @@ import kotlin.math.roundToInt
|
|||||||
|
|
||||||
class GridTouchHelper(
|
class GridTouchHelper(
|
||||||
context: Context,
|
context: Context,
|
||||||
private val listener: OnGridTouchListener
|
private val listener: OnGridTouchListener,
|
||||||
) : GestureDetector.SimpleOnGestureListener() {
|
) : GestureDetector.SimpleOnGestureListener() {
|
||||||
|
|
||||||
private val detector = GestureDetector(context, this)
|
private val detector = GestureDetector(context, this)
|
||||||
@@ -16,7 +16,7 @@ class GridTouchHelper(
|
|||||||
private var isDispatching = false
|
private var isDispatching = false
|
||||||
|
|
||||||
init {
|
init {
|
||||||
detector.setIsLongpressEnabled(false)
|
detector.setIsLongpressEnabled(true)
|
||||||
detector.setOnDoubleTapListener(this)
|
detector.setOnDoubleTapListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ class GridTouchHelper(
|
|||||||
}
|
}
|
||||||
2 -> AREA_RIGHT
|
2 -> AREA_RIGHT
|
||||||
else -> return false
|
else -> return false
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -66,4 +66,4 @@ class GridTouchHelper(
|
|||||||
|
|
||||||
fun onProcessTouch(rawX: Int, rawY: Int): Boolean
|
fun onProcessTouch(rawX: Int, rawY: Int): Boolean
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user