新增点击总是翻下一页功能

pull/75/head
Administrator 5 years ago
parent e672e82c21
commit a7b055974c
  1. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  3. 5
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt
  4. 6
      app/src/main/res/xml/pref_config_read.xml

@ -4,6 +4,7 @@ object PreferKey {
const val downloadPath = "downloadPath" const val downloadPath = "downloadPath"
const val hideStatusBar = "hideStatusBar" const val hideStatusBar = "hideStatusBar"
const val clickAllNext = "clickAllNext"
const val hideNavigationBar = "hideNavigationBar" const val hideNavigationBar = "hideNavigationBar"
const val precisionSearch = "precisionSearch" const val precisionSearch = "precisionSearch"
const val prevKey = "prevKeyCode" const val prevKey = "prevKeyCode"

@ -94,6 +94,7 @@ class MoreConfigDialog : DialogFragment() {
when (key) { when (key) {
PreferKey.hideStatusBar -> postEvent(Bus.UP_CONFIG, true) PreferKey.hideStatusBar -> postEvent(Bus.UP_CONFIG, true)
PreferKey.hideNavigationBar -> postEvent(Bus.UP_CONFIG, true) PreferKey.hideNavigationBar -> postEvent(Bus.UP_CONFIG, true)
PreferKey.clickAllNext -> postEvent(Bus.UP_CONFIG, true)
} }
} }

@ -9,8 +9,10 @@ import android.widget.Scroller
import androidx.annotation.CallSuper import androidx.annotation.CallSuper
import androidx.interpolator.view.animation.FastOutLinearInInterpolator import androidx.interpolator.view.animation.FastOutLinearInInterpolator
import com.google.android.material.snackbar.Snackbar 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.ContentView
import io.legado.app.ui.book.read.page.PageView 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.screenshot
import io.legado.app.utils.snackbar import io.legado.app.utils.snackbar
import kotlin.math.abs import kotlin.math.abs
@ -256,7 +258,8 @@ abstract class PageDelegate(protected val pageView: PageView) {
pageView.callBack?.clickCenter() pageView.callBack?.clickCenter()
setTouchPoint(x, y) setTouchPoint(x, y)
} else { } else {
bitmap = if (x > viewWidth / 2) { bitmap = if (x > viewWidth / 2 ||
pageView.context.getPrefBoolean(PreferKey.clickAllNext, false)) {
//设置动画方向 //设置动画方向
if (!hasNext()) { if (!hasNext()) {
return true return true

@ -20,6 +20,12 @@
android:key="volumeKeyPage" android:key="volumeKeyPage"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference
android:defaultValue="false"
android:title="@string/click_all_next_page"
android:key="clickAllNext"
app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.lib.theme.prefs.ATESwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/volume_key_page_on_play" android:title="@string/volume_key_page_on_play"

Loading…
Cancel
Save