diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 4c8f48f62..282f4606e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -329,7 +329,7 @@ class ReadBookActivity : BaseReadBookActivity(), * 按键事件 */ override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { - if (menuLayoutIsVisible) { + if (menuLayoutIsVisible && !getPrefBoolean("disableReturnKey")) { return super.onKeyDown(keyCode, event) } when { @@ -367,6 +367,11 @@ class ReadBookActivity : BaseReadBookActivity(), binding.readView.pageDelegate?.keyTurnPage(PageDirection.NEXT) return true } + keyCode == KeyEvent.KEYCODE_BACK -> { + if (getPrefBoolean("disableReturnKey")) { + return true + } + } } return super.onKeyDown(keyCode, event) } diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 892a59490..390591901 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -696,6 +696,7 @@ Switch Layout Text font weight switching Full screen gestures support + Disable return key Primario diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index b308ada13..011b25d7a 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -700,6 +700,7 @@ Switch Layout Text font weight switching Full screen gestures support + Disable return key Primary diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 5326f806e..5bd8148c5 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -700,6 +700,7 @@ Alterar o layout Alteração de tamanho da fonte de texto Suporte aos gestos em tela completa + 禁用返回键 Primário diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index b36e44594..77bb68e3b 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -688,6 +688,7 @@ 信息 切換佈局 全面屏手勢優化 + 禁用返回鍵 主色調 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 46dcab31e..3691f8108 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -699,6 +699,7 @@ 切換布局 文章字重轉換 全面屏手勢最佳化 + 禁用返回鍵 主色調 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 3628cd445..46f7b1baa 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -699,6 +699,7 @@ 切换布局 文章字重切换 全面屏手势优化 + 禁用返回键 主色调 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eb6208c7c..cae0e2eae 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -700,6 +700,7 @@ Switch Layout Text font weight switching Full screen gestures support + Disable return key Primary diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index 7ad5985df..bda589697 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -110,6 +110,13 @@ app:iconSpaceReserved="false" app:isBottomBackground="true" /> + +