pull/67/head
kunfei 5 years ago
parent 5cf7a1c6e0
commit 6506a887b9
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt

@ -133,7 +133,9 @@ class ContentView : FrameLayout {
fun scrollTo(pos: Int?) {
if (pos != null) {
content_text_view.post {
content_text_view.scrollTo(0, content_text_view.layout.getLineTop(pos))
if (content_text_view.layout.lineCount >= pos) {
content_text_view.scrollTo(0, content_text_view.layout.getLineTop(pos))
}
}
}
}

Loading…
Cancel
Save