1 回答
TA贡献1827条经验 获得超8个赞
GestureListener是一个抽象类。因此,您必须在抽象类本身或代码中实现尚未实现的成员,如下iew.OnTouchListener所示-GestureDetector.OnGestureListener
canvasImage.setOnTouchListener(object : GestureListener(textView) {
override fun onShowPress(e: MotionEvent?) {
TODO("not implemented")
}
override fun onSingleTapUp(e: MotionEvent?): Boolean {
TODO("not implemented")
}
override fun onDown(e: MotionEvent?): Boolean {
TODO("not implemented")
}
override fun onScroll(
e1: MotionEvent?,
e2: MotionEvent?,
distanceX: Float,
distanceY: Float
): Boolean {
TODO("not implemented")
}
override fun onLongPress(e: MotionEvent?) {
TODO("not implemented")
}
})
添加回答
举报