pull/1463/head^2
gedoor 3 years ago
parent 327107bfaa
commit 835257107d
  1. 4
      app/src/main/assets/updateLog.md
  2. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  3. 3
      app/src/main/java/io/legado/app/help/AppConfig.kt
  4. 4
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  5. 18
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt
  6. 7
      app/src/main/res/xml/pref_config_read.xml

@ -13,6 +13,10 @@
**2021/12/10** **2021/12/10**
* 修复全面屏手势会触发翻页的bug
**2021/12/10**
* 朗读出错不弹出朗读界面的时候可以长按朗读按钮进入朗读界面切换朗读引擎,这个有很多人不知道 * 朗读出错不弹出朗读界面的时候可以长按朗读按钮进入朗读界面切换朗读引擎,这个有很多人不知道
* 修复cronet访问出错时应用崩溃的bug * 修复cronet访问出错时应用崩溃的bug
* 修复一些epub目录不全或内容不全的问题 * 修复一些epub目录不全或内容不全的问题

@ -85,7 +85,6 @@ object PreferKey {
const val exportCharset = "exportCharset" const val exportCharset = "exportCharset"
const val exportUseReplace = "exportUseReplace" const val exportUseReplace = "exportUseReplace"
const val useZhLayout = "useZhLayout" const val useZhLayout = "useZhLayout"
const val fullScreenGesturesSupport = "fullScreenGesturesSupport"
const val brightness = "brightness" const val brightness = "brightness"
const val nightBrightness = "nightBrightness" const val nightBrightness = "nightBrightness"
const val expandTextMenu = "expandTextMenu" const val expandTextMenu = "expandTextMenu"

@ -255,9 +255,6 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
val replaceEnableDefault get() = appCtx.getPrefBoolean(PreferKey.replaceEnableDefault, true) val replaceEnableDefault get() = appCtx.getPrefBoolean(PreferKey.replaceEnableDefault, true)
val fullScreenGesturesSupport: Boolean
get() = appCtx.getPrefBoolean(PreferKey.fullScreenGesturesSupport, false)
val doublePageHorizontal: Boolean val doublePageHorizontal: Boolean
get() = appCtx.getPrefBoolean(PreferKey.doublePageHorizontal, true) get() = appCtx.getPrefBoolean(PreferKey.doublePageHorizontal, true)

@ -17,7 +17,6 @@ import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.primaryColor import io.legado.app.lib.theme.primaryColor
import io.legado.app.model.ReadBook import io.legado.app.model.ReadBook
import io.legado.app.ui.book.read.ReadBookActivity 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.ui.book.read.page.provider.ChapterProvider
import io.legado.app.utils.dp import io.legado.app.utils.dp
import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.getPrefBoolean
@ -138,9 +137,6 @@ class MoreConfigDialog : DialogFragment() {
"clickRegionalConfig" -> { "clickRegionalConfig" -> {
(activity as? ReadBookActivity)?.showClickRegionalConfig() (activity as? ReadBookActivity)?.showClickRegionalConfig()
} }
"fullScreenGesturesSupport" -> {
((activity as? ReadBookActivity)?.findViewById(R.id.read_view) as ReadView).setRect9x()
}
} }
return super.onPreferenceTreeClick(preference) return super.onPreferenceTreeClick(preference)
} }

@ -48,10 +48,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
val curPage by lazy { PageView(context) } val curPage by lazy { PageView(context) }
val nextPage by lazy { PageView(context) } val nextPage by lazy { PageView(context) }
val defaultAnimationSpeed = 300 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 pressDown = false
private var isMove = 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) { override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
super.onSizeChanged(w, h, oldw, oldh) 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() setRect9x()
prevPage.x = -w.toFloat() prevPage.x = -w.toFloat()
pageDelegate?.setViewSize(w, h) pageDelegate?.setViewSize(w, h)

@ -117,13 +117,6 @@
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:isBottomBackground="true" /> app:isBottomBackground="true" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false"
android:key="fullScreenGesturesSupport"
android:title="@string/full_screen_gestures_support"
app:iconSpaceReserved="false"
app:isBottomBackground="true" />
<io.legado.app.ui.widget.prefs.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="customPageKey" android:key="customPageKey"
android:title="@string/custom_page_key" android:title="@string/custom_page_key"

Loading…
Cancel
Save