pull/34/head
kunfei 5 years ago
parent 0c0d81c14b
commit c6b5ec21f2
  1. 6
      app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt

@ -125,10 +125,7 @@ class ContentTextView : AppCompatTextView {
} }
MotionEvent.ACTION_MOVE -> { MotionEvent.ACTION_MOVE -> {
val index = event.findPointerIndex(mScrollPointerId) val index = event.findPointerIndex(mScrollPointerId)
if (index < 0) { if (index > 0) {
return false
}
val y = (event.getY(index) + 0.5f).toInt() val y = (event.getY(index) + 0.5f).toInt()
var dy = mLastTouchY - y var dy = mLastTouchY - y
@ -152,6 +149,7 @@ class ContentTextView : AppCompatTextView {
mLastTouchY = y mLastTouchY = y
} }
} }
}
MotionEvent.ACTION_POINTER_UP -> { MotionEvent.ACTION_POINTER_UP -> {
if (event.getPointerId(actionIndex) == mScrollPointerId) { if (event.getPointerId(actionIndex) == mScrollPointerId) {
// Pick a new pointer to pick up the slack. // Pick a new pointer to pick up the slack.

Loading…
Cancel
Save