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) + } + /** * 移动结束 */