diff --git a/app/src/main/java/io/legado/app/help/config/AppConfig.kt b/app/src/main/java/io/legado/app/help/config/AppConfig.kt index 8fa01999a..8be6ccd4f 100644 --- a/app/src/main/java/io/legado/app/help/config/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/AppConfig.kt @@ -312,8 +312,8 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val loadCoverOnlyWifi = appCtx.getPrefBoolean(PreferKey.loadCoverOnlyWifi, false) - val doublePageHorizontal: Boolean - get() = appCtx.getPrefBoolean(PreferKey.doublePageHorizontal, true) + val doublePageHorizontal: String? + get() = appCtx.getPrefString(PreferKey.doublePageHorizontal) var searchGroup: String get() = appCtx.getPrefString("searchGroup") ?: "" diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt index be8eb28b1..5ae48f727 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt @@ -612,9 +612,15 @@ object ChapterProvider { * 更新绘制尺寸 */ fun upLayout() { - doublePage = (viewWidth > viewHeight || appCtx.isPad) - && ReadBook.pageAnim() != 3 - && AppConfig.doublePageHorizontal + when(AppConfig.doublePageHorizontal){ + "0" -> doublePage = false + "1" -> doublePage = true + "2" -> { + doublePage = (viewWidth > viewHeight) + && ReadBook.pageAnim() != 3 + } + } + if (viewWidth > 0 && viewHeight > 0) { paddingLeft = ReadBookConfig.paddingLeft.dpToPx() paddingTop = ReadBookConfig.paddingTop.dpToPx() diff --git a/app/src/main/res/values-zh/arrays.xml b/app/src/main/res/values-zh/arrays.xml index d44eceafb..f88cb19ae 100644 --- a/app/src/main/res/values-zh/arrays.xml +++ b/app/src/main/res/values-zh/arrays.xml @@ -25,6 +25,12 @@ E-Ink(墨水屏) + + 全局单页 + 全局双页 + 横屏双页/竖屏单页 + + 自动 黑色 diff --git a/app/src/main/res/values/array_values.xml b/app/src/main/res/values/array_values.xml index 3793a651c..fe4cf386d 100644 --- a/app/src/main/res/values/array_values.xml +++ b/app/src/main/res/values/array_values.xml @@ -33,6 +33,12 @@ 3 + + 0 + 1 + 2 + + auto zh diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 47dd6b09a..d5202d585 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -61,6 +61,12 @@ @string/screen_sensor + + 全局单页 + 全局双页 + 横屏双页 竖屏单页 + + iconMain icon1 diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index aeb572e58..db6e8f6ed 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -41,13 +41,16 @@ app:iconSpaceReserved="false" app:isBottomBackground="true" /> - +