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" /> + +