From e451c05a00550b69da61c2087befd31e231e8aea Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 15 Feb 2020 17:02:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/book/read/page/delegate/HorizontalPageDelegate.kt | 6 ++---- .../app/ui/book/read/page/delegate/ScrollPageDelegate.kt | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt index 0e075a6ce..6db9ee283 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt @@ -1,6 +1,5 @@ package io.legado.app.ui.book.read.page.delegate -import android.text.method.ScrollingMovementMethod import android.view.MotionEvent import io.legado.app.constant.PreferKey import io.legado.app.ui.book.read.page.PageView @@ -53,10 +52,9 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie override fun upSelectAble() { pageView.curPage?.contentTextView()?.apply { if (context.getPrefBoolean(PreferKey.selectText)) { - isSelected = false + setTextIsSelectable(true) } else { - movementMethod = ScrollingMovementMethod.getInstance() - isSelected = true + setTextIsSelectable(false) } } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt index 8e1c517e2..bf2833096 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt @@ -123,11 +123,10 @@ class ScrollPageDelegate(pageView: PageView) : PageDelegate(pageView) { override fun upSelectAble() { pageView.curPage?.contentTextView()?.apply { if (context.getPrefBoolean(PreferKey.selectText)) { - isSelected = false - movementMethod = ScrollingMovementMethod.getInstance() + setTextIsSelectable(true) } else { + setTextIsSelectable(false) movementMethod = ScrollingMovementMethod.getInstance() - isSelected = true } } }