diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index dc2e037f2..37fe747a8 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -13,6 +13,10 @@ **2021/12/10** +* 修复全面屏手势会触发翻页的bug + +**2021/12/10** + * 朗读出错不弹出朗读界面的时候可以长按朗读按钮进入朗读界面切换朗读引擎,这个有很多人不知道 * 修复cronet访问出错时应用崩溃的bug * 修复一些epub目录不全或内容不全的问题 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 ac38b1264..b5f90219c 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -85,7 +85,6 @@ object PreferKey { const val exportCharset = "exportCharset" const val exportUseReplace = "exportUseReplace" const val useZhLayout = "useZhLayout" - const val fullScreenGesturesSupport = "fullScreenGesturesSupport" const val brightness = "brightness" const val nightBrightness = "nightBrightness" const val expandTextMenu = "expandTextMenu" diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt index d3afd4b6c..734044f57 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -255,9 +255,6 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val replaceEnableDefault get() = appCtx.getPrefBoolean(PreferKey.replaceEnableDefault, true) - val fullScreenGesturesSupport: Boolean - get() = appCtx.getPrefBoolean(PreferKey.fullScreenGesturesSupport, false) - val doublePageHorizontal: Boolean get() = appCtx.getPrefBoolean(PreferKey.doublePageHorizontal, true) 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 fd49c466e..769bf9c1e 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 @@ -17,7 +17,6 @@ import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.primaryColor import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.ReadBookActivity -import io.legado.app.ui.book.read.page.ReadView import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.utils.dp import io.legado.app.utils.getPrefBoolean @@ -138,9 +137,6 @@ class MoreConfigDialog : DialogFragment() { "clickRegionalConfig" -> { (activity as? ReadBookActivity)?.showClickRegionalConfig() } - "fullScreenGesturesSupport" -> { - ((activity as? ReadBookActivity)?.findViewById(R.id.read_view) as ReadView).setRect9x() - } } return super.onPreferenceTreeClick(preference) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt index e16d52755..1cb59cb1a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt @@ -48,10 +48,6 @@ class ReadView(context: Context, attrs: AttributeSet) : val curPage by lazy { PageView(context) } val nextPage by lazy { PageView(context) } val defaultAnimationSpeed = 300 - private var insetLeft: Int = 0 - private var insetTop: Int = 0 - private var insetRight: Int = 0 - private var insetBottom: Int = 0 private var pressDown = false private var isMove = false @@ -122,20 +118,6 @@ class ReadView(context: Context, attrs: AttributeSet) : override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { super.onSizeChanged(w, h, oldw, oldh) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - val insets = - this.rootWindowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.systemGestures()) - insetLeft = insets.left - insetTop = insets.top - insetRight = insets.right - insetBottom = insets.bottom - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - val insets = this.rootWindowInsets.systemWindowInsets - insetLeft = insets.left - insetTop = insets.top - insetRight = insets.right - insetBottom = insets.bottom - } setRect9x() prevPage.x = -w.toFloat() pageDelegate?.setViewSize(w, h) diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index bda589697..4b26da4b7 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -117,13 +117,6 @@ app:iconSpaceReserved="false" app:isBottomBackground="true" /> - -