Merge pull request #2249 from 821938089/little-fix

优化仿真翻页点击翻页效果
pull/2250/head
kunfei 2 years ago committed by GitHub
commit 4e5a4d434e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt

@ -119,7 +119,11 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie
abortAnim()
if (!hasNext()) return
setDirection(PageDirection.NEXT)
readView.setStartPoint(viewWidth.toFloat(), 1f, false)
val y = when {
viewHeight / 2 < startY -> viewHeight.toFloat() * 0.9f
else -> 1f
}
readView.setStartPoint(viewWidth.toFloat() * 0.9f, y, false)
onAnimStart(animationSpeed)
}

Loading…
Cancel
Save