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

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

Loading…
Cancel
Save