private fun checkInMoving(x: Float, y: Float) { val xDiff = Math.abs(x - lastMotionX) as Int val yDiff = Math.abs(y - lastMotionY) as Int val touchSlop: Int = this.touchSlop val xMoved = xDiff > touchSlop val yMoved = yDiff > touchSlop if (xMoved) { touchState = TOUCH_STATE_SCROLLING_X lastMotionX = x lastMotionY = y } if (yMoved) { touchState = TOUCH_STATE_SCROLLING_Y lastMotionX = x lastMotionY = y } }
Check if the user is moving the cell