滚动每次移动1像素,使滚动更平滑

pull/967/head
gedoor 4 years ago
parent 681c17760d
commit 811f8ef913
  1. 10
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt

@ -236,7 +236,15 @@ class PageView(context: Context) : FrameLayout(context) {
}
fun scroll(offset: Int) {
binding.contentTextView.scroll(offset)
if (offset > 0) {
for (i in 1..offset) {
binding.contentTextView.scroll(1)
}
} else {
for (i in offset..-1) {
binding.contentTextView.scroll(-1)
}
}
}
fun upSelectAble(selectAble: Boolean) {

Loading…
Cancel
Save