feat: 优化代码

pull/106/head
kunfei 5 years ago
parent f7b434f4b7
commit 8b513c31fe
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.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 {

@ -266,6 +266,10 @@ abstract class PageDelegate(protected val pageView: PageView) :
return true
}
override fun onLongPress(e: MotionEvent) {
curPage.selectText(e)
}
/**
* 移动结束
*/

Loading…
Cancel
Save