From 52381371935adab6e9fe741018241e78801ebede Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 Sep 2019 10:11:18 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/widget/page/ContentTextView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt index c2a9632ba..ff8fd1dc9 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt @@ -124,9 +124,9 @@ class ContentTextView : AppCompatTextView { } MotionEvent.ACTION_UP -> { velocityTracker?.computeCurrentVelocity(1000, mMaxFlingVelocity.toFloat()) - val yVelocity = velocityTracker?.getXVelocity(mScrollPointerId) ?: 0f + val yVelocity = velocityTracker?.getYVelocity(mScrollPointerId) ?: 0f if (abs(yVelocity) > mMinFlingVelocity) { - mViewFling.fling(yVelocity.toInt()) + mViewFling.fling(-yVelocity.toInt()) } else { setScrollState(SCROLL_STATE_IDLE) }