feat: 优化代码

pull/117/head
kunfei 5 years ago
parent 0074281016
commit d400a67f53
  1. 4
      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

@ -105,6 +105,10 @@ class ContentView(context: Context) : FrameLayout(context) {
}
}
fun resetPageOffset() {
content_text_view.resetPageOffset()
}
@SuppressLint("SetTextI18n")
fun setPageIndex(pageIndex: Int?) {
pageIndex?.let {

@ -70,6 +70,10 @@ abstract class PageDelegate(protected val pageView: PageView) :
var firstLineIndex: Int = 0
var firstCharIndex: Int = 0
init {
curPage.resetPageOffset()
}
open fun setStartPoint(x: Float, y: Float, invalidate: Boolean = true) {
startX = x
startY = y

Loading…
Cancel
Save