From 2a8f9e1db9aa0486a8ca5d631062697c892c8985 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 Sep 2019 00:11:33 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/widget/page/delegate/PageDelegate.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/widget/page/delegate/PageDelegate.kt index c2692c7d9..996d0bfc2 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/delegate/PageDelegate.kt @@ -3,6 +3,7 @@ package io.legado.app.ui.widget.page.delegate import android.graphics.Bitmap import android.graphics.Canvas import android.graphics.RectF +import android.text.method.ScrollingMovementMethod import android.view.GestureDetector import android.view.MotionEvent import android.widget.Scroller @@ -45,6 +46,10 @@ abstract class PageDelegate(protected val pageView: PageView) { ) } + private val scrollingMovementMethod: ScrollingMovementMethod by lazy { + ScrollingMovementMethod() + } + private val detector: GestureDetector by lazy { GestureDetector( pageView.context, @@ -266,6 +271,7 @@ abstract class PageDelegate(protected val pageView: PageView) { distanceY: Float ): Boolean { curPage?.contentTextView()?.setTextIsSelectable(false) + curPage?.contentTextView()?.movementMethod = scrollingMovementMethod if (pageView.isScrollDelegate()) { curPage?.dispatchTouchEvent(e2) return true