feat: 优化代码

pull/106/head
kunfei 5 years ago
parent 1323719ced
commit 1b58489ee3
  1. 1
      app/src/main/assets/updateLog.md
  2. 16
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -4,6 +4,7 @@
**2020/02/21** **2020/02/21**
* 重写了阅读界面,实现了段距调整,两端对齐,页眉页脚调整 * 重写了阅读界面,实现了段距调整,两端对齐,页眉页脚调整
* 选择文本暂不可用,滚动暂不可用,仿真翻页还有问题
**2020/02/19** **2020/02/19**
* 导出功能完成 * 导出功能完成

@ -5,9 +5,7 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.view.KeyEvent import android.view.*
import android.view.Menu
import android.view.MenuItem
import androidx.core.view.get import androidx.core.view.get
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.size import androidx.core.view.size
@ -54,6 +52,7 @@ import org.jetbrains.anko.startActivityForResult
import org.jetbrains.anko.toast import org.jetbrains.anko.toast
class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_book_read), class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_book_read),
View.OnTouchListener,
PageView.CallBack, PageView.CallBack,
ReadMenu.CallBack, ReadMenu.CallBack,
ReadAloudDialog.CallBack, ReadAloudDialog.CallBack,
@ -117,6 +116,8 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
private fun initView() { private fun initView() {
cursor_left.setColorFilter(accentColor) cursor_left.setColorFilter(accentColor)
cursor_right.setColorFilter(accentColor) cursor_right.setColorFilter(accentColor)
cursor_left.setOnTouchListener(this)
cursor_right.setOnTouchListener(this)
tv_chapter_name.onClick { tv_chapter_name.onClick {
ReadBook.webBook?.let { ReadBook.webBook?.let {
startActivityForResult<BookSourceEditActivity>( startActivityForResult<BookSourceEditActivity>(
@ -308,6 +309,15 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
return super.onKeyUp(keyCode, event) return super.onKeyUp(keyCode, event)
} }
/**
* view触摸
*/
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
return true
}
/** /**
* 音量键翻页 * 音量键翻页
*/ */

Loading…
Cancel
Save