修复长图最后一页滚动问题

pull/457/head
gedoor 4 years ago
parent 508ab28512
commit a97f480d24
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt

@ -22,6 +22,7 @@ import io.legado.app.utils.activity
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefBoolean
import kotlinx.coroutines.CoroutineScope
import kotlin.math.min
/**
* 阅读内容界面
@ -181,7 +182,8 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
&& pageOffset < 0
&& pageOffset + textPage.height < ChapterProvider.visibleHeight
) {
pageOffset = 0f
val offset = ChapterProvider.visibleHeight - textPage.height
pageOffset = min(0f, offset)
} else if (pageOffset > 0) {
pageFactory.moveToPrev(false)
textPage = pageFactory.currentPage

Loading…
Cancel
Save