From 1b58489ee34e4c202b1b611d4d20de009e9574a1 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 21 Feb 2020 19:02:53 +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 --- app/src/main/assets/updateLog.md | 1 + .../legado/app/ui/book/read/ReadBookActivity.kt | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 2aa644b26..697c57b4b 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -4,6 +4,7 @@ **2020/02/21** * 重写了阅读界面,实现了段距调整,两端对齐,页眉页脚调整 +* 选择文本暂不可用,滚动暂不可用,仿真翻页还有问题 **2020/02/19** * 导出功能完成 diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 8800b5abc..c46bd86ea 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -5,9 +5,7 @@ import android.content.Intent import android.net.Uri import android.os.Bundle import android.os.Handler -import android.view.KeyEvent -import android.view.Menu -import android.view.MenuItem +import android.view.* import androidx.core.view.get import androidx.core.view.isVisible import androidx.core.view.size @@ -54,6 +52,7 @@ import org.jetbrains.anko.startActivityForResult import org.jetbrains.anko.toast class ReadBookActivity : VMBaseActivity(R.layout.activity_book_read), + View.OnTouchListener, PageView.CallBack, ReadMenu.CallBack, ReadAloudDialog.CallBack, @@ -117,6 +116,8 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo private fun initView() { cursor_left.setColorFilter(accentColor) cursor_right.setColorFilter(accentColor) + cursor_left.setOnTouchListener(this) + cursor_right.setOnTouchListener(this) tv_chapter_name.onClick { ReadBook.webBook?.let { startActivityForResult( @@ -308,6 +309,15 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo return super.onKeyUp(keyCode, event) } + /** + * view触摸 + */ + override fun onTouch(v: View?, event: MotionEvent?): Boolean { + + + return true + } + /** * 音量键翻页 */