From 45b6f77eab20003f1cb14c5b9532e925bc0ccc66 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 8 May 2021 15:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BF=BB=E9=A1=B5=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/read/page/delegate/HorizontalPageDelegate.kt | 4 ++-- .../io/legado/app/ui/book/read/page/delegate/PageDelegate.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt index 11b469af1..3f8c29ca3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt @@ -119,7 +119,7 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie abortAnim() if (!hasNext()) return setDirection(PageDirection.NEXT) - readView.setTouchPoint(viewWidth.toFloat(), 0f, false) + readView.setStartPoint(viewWidth.toFloat(), 0f, false) onAnimStart(animationSpeed) } @@ -127,7 +127,7 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie abortAnim() if (!hasPrev()) return setDirection(PageDirection.PREV) - readView.setTouchPoint(0f, 0f) + readView.setStartPoint(0f, 0f, false) onAnimStart(animationSpeed) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt index a70961487..2b417240c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt @@ -3,7 +3,7 @@ package io.legado.app.ui.book.read.page.delegate import android.content.Context import android.graphics.Canvas import android.view.MotionEvent -import android.view.animation.DecelerateInterpolator +import android.view.animation.LinearInterpolator import android.widget.Scroller import androidx.annotation.CallSuper import com.google.android.material.snackbar.Snackbar @@ -37,7 +37,7 @@ abstract class PageDelegate(protected val readView: ReadView) { protected var viewHeight: Int = readView.height protected val scroller: Scroller by lazy { - Scroller(readView.context, DecelerateInterpolator()) + Scroller(readView.context, LinearInterpolator()) } private val snackBar: Snackbar by lazy {