|
|
@ -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 { |
|
|
|