feat: 优化代码

pull/117/head
kunfei 5 years ago
parent 8079f7a589
commit 0074281016
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/content/BaseContentTextView.kt

@ -21,7 +21,7 @@ abstract class BaseContentTextView(context: Context, attrs: AttributeSet?) : Vie
var selectAble = context.getPrefBoolean(PreferKey.textSelectAble) var selectAble = context.getPrefBoolean(PreferKey.textSelectAble)
var upView: ((TextPage) -> Unit)? = null var upView: ((TextPage) -> Unit)? = null
protected val selectedPaint by lazy { private val selectedPaint by lazy {
Paint().apply { Paint().apply {
color = context.getCompatColor(R.color.btn_bg_press_2) color = context.getCompatColor(R.color.btn_bg_press_2)
style = Paint.Style.FILL style = Paint.Style.FILL
@ -69,9 +69,9 @@ abstract class BaseContentTextView(context: Context, attrs: AttributeSet?) : Vie
} }
} }
abstract fun drawScrollPage(canvas: Canvas) protected abstract fun drawScrollPage(canvas: Canvas)
abstract fun drawHorizontalPage(canvas: Canvas) protected abstract fun drawHorizontalPage(canvas: Canvas)
protected fun drawChars( protected fun drawChars(
canvas: Canvas, canvas: Canvas,

Loading…
Cancel
Save