From 8b513c31fe7b0ab1571a4b2a3580461abb2a1573 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 21 Feb 2020 14:57: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 --- .../java/io/legado/app/ui/book/read/page/ContentView.kt | 6 ++++++ .../legado/app/ui/book/read/page/delegate/PageDelegate.kt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt index 0e5752c64..d8d25ae2a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt @@ -4,6 +4,7 @@ import android.annotation.SuppressLint import android.content.Context import android.graphics.drawable.Drawable import android.util.AttributeSet +import android.view.MotionEvent import android.widget.FrameLayout import io.legado.app.R import io.legado.app.constant.AppConst.TIME_FORMAT @@ -109,6 +110,11 @@ class ContentView : FrameLayout { content_text_view.selectAble = selectAble } + fun selectText(e: MotionEvent) { + + + } + fun scrollTo(pos: Int?) { if (pos != null) { content_text_view.post { diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt index b2ac16c45..f655928d7 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt @@ -266,6 +266,10 @@ abstract class PageDelegate(protected val pageView: PageView) : return true } + override fun onLongPress(e: MotionEvent) { + curPage.selectText(e) + } + /** * 移动结束 */