|
|
@ -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. |
|
|
|