From a7b055974c98b85455f5b29ab65d4adaa80bdc43 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 17 Jan 2020 21:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E7=BF=BB=E4=B8=8B=E4=B8=80=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/constant/PreferKey.kt | 1 + .../io/legado/app/ui/book/read/config/MoreConfigDialog.kt | 1 + .../legado/app/ui/book/read/page/delegate/PageDelegate.kt | 5 ++++- app/src/main/res/xml/pref_config_read.xml | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/constant/PreferKey.kt b/app/src/main/java/io/legado/app/constant/PreferKey.kt index ac1ba5ce5..b869927e6 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -4,6 +4,7 @@ object PreferKey { const val downloadPath = "downloadPath" const val hideStatusBar = "hideStatusBar" + const val clickAllNext = "clickAllNext" const val hideNavigationBar = "hideNavigationBar" const val precisionSearch = "precisionSearch" const val prevKey = "prevKeyCode" diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index c1954a4e1..899d58d63 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -94,6 +94,7 @@ class MoreConfigDialog : DialogFragment() { when (key) { PreferKey.hideStatusBar -> postEvent(Bus.UP_CONFIG, true) PreferKey.hideNavigationBar -> postEvent(Bus.UP_CONFIG, true) + PreferKey.clickAllNext -> postEvent(Bus.UP_CONFIG, true) } } 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 3f78253b6..db1250c3d 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 @@ -9,8 +9,10 @@ import android.widget.Scroller import androidx.annotation.CallSuper import androidx.interpolator.view.animation.FastOutLinearInInterpolator import com.google.android.material.snackbar.Snackbar +import io.legado.app.constant.PreferKey import io.legado.app.ui.book.read.page.ContentView import io.legado.app.ui.book.read.page.PageView +import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.screenshot import io.legado.app.utils.snackbar import kotlin.math.abs @@ -256,7 +258,8 @@ abstract class PageDelegate(protected val pageView: PageView) { pageView.callBack?.clickCenter() setTouchPoint(x, y) } else { - bitmap = if (x > viewWidth / 2) { + bitmap = if (x > viewWidth / 2 || + pageView.context.getPrefBoolean(PreferKey.clickAllNext, false)) { //设置动画方向 if (!hasNext()) { return true diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index 4d996bd8d..b24a16a71 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -20,6 +20,12 @@ android:key="volumeKeyPage" app:iconSpaceReserved="false" /> + +