diff --git a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt
index 9515cbcff..a91c8a0dd 100644
--- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt
+++ b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt
@@ -350,8 +350,8 @@ object ReadBookConfig {
exportConfig.tipFooterLeft = shareConfig.tipFooterLeft
exportConfig.tipFooterMiddle = shareConfig.tipFooterMiddle
exportConfig.tipFooterRight = shareConfig.tipFooterRight
- exportConfig.hideHeader = shareConfig.hideHeader
- exportConfig.hideFooter = shareConfig.hideFooter
+ exportConfig.headerMode = shareConfig.headerMode
+ exportConfig.footerMode = shareConfig.footerMode
}
return exportConfig
}
@@ -405,8 +405,8 @@ object ReadBookConfig {
var tipFooterLeft: Int = ReadTipConfig.chapterTitle,
var tipFooterMiddle: Int = ReadTipConfig.none,
var tipFooterRight: Int = ReadTipConfig.pageAndTotal,
- var hideHeader: Boolean = true,
- var hideFooter: Boolean = false
+ var headerMode: Int = 0,
+ var footerMode: Int = 0
) : Parcelable {
fun setCurTextColor(color: Int) {
diff --git a/app/src/main/java/io/legado/app/help/ReadTipConfig.kt b/app/src/main/java/io/legado/app/help/ReadTipConfig.kt
index 204851aee..796772273 100644
--- a/app/src/main/java/io/legado/app/help/ReadTipConfig.kt
+++ b/app/src/main/java/io/legado/app/help/ReadTipConfig.kt
@@ -4,7 +4,15 @@ import io.legado.app.App
import io.legado.app.R
object ReadTipConfig {
- val tipArray: Array = App.INSTANCE.resources.getStringArray(R.array.read_tip)
+ val tips by lazy {
+ App.INSTANCE.resources.getStringArray(R.array.read_tip).toList()
+ }
+ val headerModes by lazy {
+ linkedMapOf(0 to "状态栏显示时隐藏", 1 to "显示", 2 to "隐藏")
+ }
+ val footerModes by lazy {
+ linkedMapOf(0 to "显示", 1 to "隐藏")
+ }
const val none = 0
const val chapterTitle = 1
const val time = 2
@@ -14,12 +22,12 @@ object ReadTipConfig {
const val pageAndTotal = 6
const val bookName = 7
- val tipHeaderLeftStr: String get() = tipArray.getOrElse(tipHeaderLeft) { tipArray[none] }
- val tipHeaderMiddleStr: String get() = tipArray.getOrElse(tipHeaderMiddle) { tipArray[none] }
- val tipHeaderRightStr: String get() = tipArray.getOrElse(tipHeaderRight) { tipArray[none] }
- val tipFooterLeftStr: String get() = tipArray.getOrElse(tipFooterLeft) { tipArray[none] }
- val tipFooterMiddleStr: String get() = tipArray.getOrElse(tipFooterMiddle) { tipArray[none] }
- val tipFooterRightStr: String get() = tipArray.getOrElse(tipFooterRight) { tipArray[none] }
+ val tipHeaderLeftStr: String get() = tips.getOrElse(tipHeaderLeft) { tips[none] }
+ val tipHeaderMiddleStr: String get() = tips.getOrElse(tipHeaderMiddle) { tips[none] }
+ val tipHeaderRightStr: String get() = tips.getOrElse(tipHeaderRight) { tips[none] }
+ val tipFooterLeftStr: String get() = tips.getOrElse(tipFooterLeft) { tips[none] }
+ val tipFooterMiddleStr: String get() = tips.getOrElse(tipFooterMiddle) { tips[none] }
+ val tipFooterRightStr: String get() = tips.getOrElse(tipFooterRight) { tips[none] }
var tipHeaderLeft: Int
get() = ReadBookConfig.config.tipHeaderLeft
@@ -57,15 +65,15 @@ object ReadTipConfig {
ReadBookConfig.config.tipFooterRight = value
}
- var hideHeader: Boolean
- get() = ReadBookConfig.config.hideHeader
+ var headerMode: Int
+ get() = ReadBookConfig.config.headerMode
set(value) {
- ReadBookConfig.config.hideHeader = value
+ ReadBookConfig.config.headerMode = value
}
- var hideFooter: Boolean
- get() = ReadBookConfig.config.hideFooter
+ var footerMode: Int
+ get() = ReadBookConfig.config.footerMode
set(value) {
- ReadBookConfig.config.hideFooter = value
+ ReadBookConfig.config.footerMode = value
}
}
\ No newline at end of file
diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt
index fa009b01b..daa41d6cd 100644
--- a/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt
+++ b/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt
@@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATECheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
init {
- ATH.setTint(this, context.accentColor)
+ if (!isInEditMode) {
+ ATH.setTint(this, context.accentColor)
+ }
}
}
diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATEProgressBar.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATEProgressBar.kt
index 20f13e03c..090c66f80 100644
--- a/app/src/main/java/io/legado/app/lib/theme/view/ATEProgressBar.kt
+++ b/app/src/main/java/io/legado/app/lib/theme/view/ATEProgressBar.kt
@@ -12,6 +12,8 @@ import io.legado.app.lib.theme.ThemeStore
class ATEProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
init {
- ATH.setTint(this, ThemeStore.accentColor(context))
+ if (!isInEditMode) {
+ ATH.setTint(this, ThemeStore.accentColor(context))
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioButton.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioButton.kt
index d416d6f8f..8654e1554 100644
--- a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioButton.kt
+++ b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioButton.kt
@@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATERadioButton(context: Context, attrs: AttributeSet) : AppCompatRadioButton(context, attrs) {
init {
- ATH.setTint(this@ATERadioButton, context.accentColor)
+ if (!isInEditMode) {
+ ATH.setTint(this@ATERadioButton, context.accentColor)
+ }
}
}
diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATESeekBar.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATESeekBar.kt
index 2d793ba82..3b8f046aa 100644
--- a/app/src/main/java/io/legado/app/lib/theme/view/ATESeekBar.kt
+++ b/app/src/main/java/io/legado/app/lib/theme/view/ATESeekBar.kt
@@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATESeekBar(context: Context, attrs: AttributeSet) : AppCompatSeekBar(context, attrs) {
init {
- ATH.setTint(this, context.accentColor)
+ if (!isInEditMode) {
+ ATH.setTint(this, context.accentColor)
+ }
}
}
diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
index b17f82cca..75704a619 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
@@ -1,6 +1,5 @@
package io.legado.app.ui.book.read.config
-import android.annotation.SuppressLint
import android.content.DialogInterface
import android.os.Bundle
import android.view.*
@@ -11,7 +10,6 @@ import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.EventBus
import io.legado.app.help.ReadBookConfig
-import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.bottomBackground
@@ -19,10 +17,12 @@ import io.legado.app.lib.theme.getPrimaryTextColor
import io.legado.app.service.help.ReadBook
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.widget.font.FontSelectDialog
-import io.legado.app.utils.*
+import io.legado.app.utils.ColorUtils
+import io.legado.app.utils.dp
+import io.legado.app.utils.getIndexById
+import io.legado.app.utils.postEvent
import kotlinx.android.synthetic.main.activity_book_read.*
import kotlinx.android.synthetic.main.dialog_read_book_style.*
-import kotlinx.android.synthetic.main.dialog_title_config.view.*
import kotlinx.android.synthetic.main.item_read_style.view.*
import org.jetbrains.anko.sdk27.listeners.onCheckedChange
import org.jetbrains.anko.sdk27.listeners.onClick
@@ -110,9 +110,6 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack {
chinese_converter.onChanged {
postEvent(EventBus.UP_CONFIG, true)
}
- tv_title_mode.onClick {
- showTitleConfig()
- }
text_font_weight_converter.onChanged {
postEvent(EventBus.UP_CONFIG, true)
}
@@ -165,36 +162,6 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack {
}
}
- @SuppressLint("InflateParams")
- private fun showTitleConfig() = ReadBookConfig.apply {
- alert(R.string.title) {
- val rootView = LayoutInflater.from(requireContext())
- .inflate(R.layout.dialog_title_config, null).apply {
- rg_title_mode.checkByIndex(titleMode)
- dsb_title_size.progress = titleSize
- dsb_title_top.progress = titleTopSpacing
- dsb_title_bottom.progress = titleBottomSpacing
- rg_title_mode.onCheckedChange { _, checkedId ->
- titleMode = rg_title_mode.getIndexById(checkedId)
- postEvent(EventBus.UP_CONFIG, true)
- }
- dsb_title_size.onChanged = {
- titleSize = it
- postEvent(EventBus.UP_CONFIG, true)
- }
- dsb_title_top.onChanged = {
- titleTopSpacing = it
- postEvent(EventBus.UP_CONFIG, true)
- }
- dsb_title_bottom.onChanged = {
- titleBottomSpacing = it
- postEvent(EventBus.UP_CONFIG, true)
- }
- }
- customView = rootView
- }.show()
- }
-
private fun changeBg(index: Int) {
val oldIndex = ReadBookConfig.styleSelect
if (index != oldIndex) {
diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt
index 86d7ca7f9..c6e34836e 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt
@@ -7,8 +7,11 @@ import android.view.ViewGroup
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.EventBus
+import io.legado.app.help.ReadBookConfig
import io.legado.app.help.ReadTipConfig
import io.legado.app.lib.dialogs.selector
+import io.legado.app.utils.checkByIndex
+import io.legado.app.utils.getIndexById
import io.legado.app.utils.postEvent
import kotlinx.android.synthetic.main.dialog_tip_config.*
import org.jetbrains.anko.sdk27.listeners.onCheckedChange
@@ -36,215 +39,130 @@ class TipConfigDialog : BaseDialogFragment() {
}
private fun initView() {
+ rg_title_mode.checkByIndex(ReadBookConfig.titleMode)
+ dsb_title_size.progress = ReadBookConfig.titleSize
+ dsb_title_top.progress = ReadBookConfig.titleTopSpacing
+ dsb_title_bottom.progress = ReadBookConfig.titleBottomSpacing
+
+ tv_header_show.text = ReadTipConfig.headerModes[ReadTipConfig.headerMode]
+ tv_footer_show.text = ReadTipConfig.footerModes[ReadTipConfig.footerMode]
+
tv_header_left.text = ReadTipConfig.tipHeaderLeftStr
tv_header_middle.text = ReadTipConfig.tipHeaderMiddleStr
tv_header_right.text = ReadTipConfig.tipHeaderRightStr
tv_footer_left.text = ReadTipConfig.tipFooterLeftStr
tv_footer_middle.text = ReadTipConfig.tipFooterMiddleStr
tv_footer_right.text = ReadTipConfig.tipFooterRightStr
- sw_hide_header.isChecked = ReadTipConfig.hideHeader
- sw_hide_footer.isChecked = ReadTipConfig.hideFooter
}
private fun initEvent() {
- tv_header_left.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderMiddle == i) {
- tipHeaderMiddle = none
- tv_header_middle.text = tipArray[none]
- }
- if (tipHeaderRight == i) {
- tipHeaderRight = none
- tv_header_right.text = tipArray[none]
- }
- if (tipFooterLeft == i) {
- tipFooterLeft = none
- tv_footer_left.text = tipArray[none]
- }
- if (tipFooterMiddle == i) {
- tipFooterMiddle = none
- tv_footer_middle.text = tipArray[none]
- }
- if (tipFooterRight == i) {
- tipFooterRight = none
- tv_footer_right.text = tipArray[none]
- }
- }
- tipHeaderLeft = i
- tv_header_left.text = tipArray[i]
- }
+ rg_title_mode.onCheckedChange { _, checkedId ->
+ ReadBookConfig.titleMode = rg_title_mode.getIndexById(checkedId)
+ postEvent(EventBus.UP_CONFIG, true)
+ }
+ dsb_title_size.onChanged = {
+ ReadBookConfig.titleSize = it
+ postEvent(EventBus.UP_CONFIG, true)
+ }
+ dsb_title_top.onChanged = {
+ ReadBookConfig.titleTopSpacing = it
+ postEvent(EventBus.UP_CONFIG, true)
+ }
+ dsb_title_bottom.onChanged = {
+ ReadBookConfig.titleBottomSpacing = it
+ postEvent(EventBus.UP_CONFIG, true)
+ }
+ ll_header_show.onClick {
+ selector(items = ReadTipConfig.headerModes.values.toList()) { _, i ->
+ ReadTipConfig.headerMode = ReadTipConfig.headerModes.keys.toList()[i]
+ tv_header_show.text = ReadTipConfig.headerModes[ReadTipConfig.headerMode]
postEvent(EventBus.UP_CONFIG, true)
}
}
- tv_header_middle.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderLeft == i) {
- tipHeaderLeft = none
- tv_header_left.text = tipArray[none]
- }
- if (tipHeaderRight == i) {
- tipHeaderRight = none
- tv_header_right.text = tipArray[none]
- }
- if (tipFooterLeft == i) {
- tipFooterLeft = none
- tv_footer_left.text = tipArray[none]
- }
- if (tipFooterMiddle == i) {
- tipFooterMiddle = none
- tv_footer_middle.text = tipArray[none]
- }
- if (tipFooterRight == i) {
- tipFooterRight = none
- tv_footer_right.text = tipArray[none]
- }
- }
- tipHeaderMiddle = i
- tv_header_middle.text = tipArray[i]
- }
+ ll_footer_show.onClick {
+ selector(items = ReadTipConfig.footerModes.values.toList()) { _, i ->
+ ReadTipConfig.footerMode = ReadTipConfig.footerModes.keys.toList()[i]
+ tv_footer_show.text = ReadTipConfig.footerModes[ReadTipConfig.footerMode]
postEvent(EventBus.UP_CONFIG, true)
}
}
- tv_header_right.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderLeft == i) {
- tipHeaderLeft = none
- tv_header_left.text = tipArray[none]
- }
- if (tipHeaderMiddle == i) {
- tipHeaderMiddle = none
- tv_header_middle.text = tipArray[none]
- }
- if (tipFooterLeft == i) {
- tipFooterLeft = none
- tv_footer_left.text = tipArray[none]
- }
- if (tipFooterMiddle == i) {
- tipFooterMiddle = none
- tv_footer_middle.text = tipArray[none]
- }
- if (tipFooterRight == i) {
- tipFooterRight = none
- tv_footer_right.text = tipArray[none]
- }
- }
- tipHeaderRight = i
- tv_header_right.text = tipArray[i]
- }
+ ll_header_left.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipHeaderLeft = i
+ tv_header_left.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
- tv_footer_left.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderLeft == i) {
- tipHeaderLeft = none
- tv_header_left.text = tipArray[none]
- }
- if (tipHeaderMiddle == i) {
- tipHeaderMiddle = none
- tv_header_middle.text = tipArray[none]
- }
- if (tipHeaderRight == i) {
- tipHeaderRight = none
- tv_header_right.text = tipArray[none]
- }
- if (tipFooterMiddle == i) {
- tipFooterMiddle = none
- tv_footer_middle.text = tipArray[none]
- }
- if (tipFooterRight == i) {
- tipFooterRight = none
- tv_footer_right.text = tipArray[none]
- }
- }
- tipFooterLeft = i
- tv_footer_left.text = tipArray[i]
- }
+ ll_header_middle.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipHeaderMiddle = i
+ tv_header_middle.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
- tv_footer_middle.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderLeft == i) {
- tipHeaderLeft = none
- tv_header_left.text = tipArray[none]
- }
- if (tipHeaderMiddle == i) {
- tipHeaderMiddle = none
- tv_header_middle.text = tipArray[none]
- }
- if (tipHeaderRight == i) {
- tipHeaderRight = none
- tv_header_right.text = tipArray[none]
- }
- if (tipFooterLeft == i) {
- tipFooterLeft = none
- tv_footer_left.text = tipArray[none]
- }
- if (tipFooterRight == i) {
- tipFooterRight = none
- tv_footer_right.text = tipArray[none]
- }
- }
- tipFooterMiddle = i
- tv_footer_middle.text = tipArray[i]
- }
+ ll_header_right.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipHeaderRight = i
+ tv_header_right.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
- tv_footer_right.onClick {
- selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
- ReadTipConfig.apply {
- if (i != none) {
- if (tipHeaderLeft == i) {
- tipHeaderLeft = none
- tv_header_left.text = tipArray[none]
- }
- if (tipHeaderMiddle == i) {
- tipHeaderMiddle = none
- tv_header_middle.text = tipArray[none]
- }
- if (tipHeaderRight == i) {
- tipHeaderRight = none
- tv_header_right.text = tipArray[none]
- }
- if (tipFooterLeft == i) {
- tipFooterLeft = none
- tv_footer_left.text = tipArray[none]
- }
- if (tipFooterMiddle == i) {
- tipFooterMiddle = none
- tv_footer_middle.text = tipArray[none]
- }
- }
- tipFooterRight = i
- tv_footer_right.text = tipArray[i]
- }
+ ll_footer_left.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipFooterLeft = i
+ tv_footer_left.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
- sw_hide_header.onCheckedChange { buttonView, isChecked ->
- if (buttonView?.isPressed == true) {
- ReadTipConfig.hideHeader = isChecked
+ ll_footer_middle.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipFooterMiddle = i
+ tv_footer_middle.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
- sw_hide_footer.onCheckedChange { buttonView, isChecked ->
- if (buttonView?.isPressed == true) {
- ReadTipConfig.hideFooter = isChecked
+ ll_footer_right.onClick {
+ selector(items = ReadTipConfig.tips) { _, i ->
+ clearRepeat(i)
+ ReadTipConfig.tipFooterRight = i
+ tv_footer_right.text = ReadTipConfig.tips[i]
postEvent(EventBus.UP_CONFIG, true)
}
}
}
+ private fun clearRepeat(repeat: Int) = ReadTipConfig.apply {
+ if (repeat != none) {
+ if (tipHeaderLeft == repeat) {
+ tipHeaderLeft = none
+ tv_header_left.text = tips[none]
+ }
+ if (tipHeaderMiddle == repeat) {
+ tipHeaderMiddle = none
+ tv_header_middle.text = tips[none]
+ }
+ if (tipHeaderRight == repeat) {
+ tipHeaderRight = none
+ tv_header_right.text = tips[none]
+ }
+ if (tipFooterLeft == repeat) {
+ tipFooterLeft = none
+ tv_footer_left.text = tips[none]
+ }
+ if (tipFooterMiddle == repeat) {
+ tipFooterMiddle = none
+ tv_footer_middle.text = tips[none]
+ }
+ if (tipFooterRight == repeat) {
+ tipFooterRight = none
+ tv_footer_right.text = tips[none]
+ }
+ }
+ }
+
}
\ No newline at end of file
diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt
index 09daf30de..e8b557b6b 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt
@@ -111,8 +111,15 @@ class ContentView(context: Context) : FrameLayout(context) {
bv_footer_left.isInvisible = tipFooterLeft == none || !tv_footer_left.isInvisible
tv_footer_right.isGone = tipFooterRight == none
tv_footer_middle.isGone = tipFooterMiddle == none
- ll_header.isGone = hideHeader
- ll_footer.isGone = hideFooter
+ ll_header.isGone = when (headerMode) {
+ 1 -> false
+ 2 -> true
+ else -> !ReadBookConfig.hideStatusBar
+ }
+ ll_footer.isGone = when (footerMode) {
+ 1 -> true
+ else -> false
+ }
}
tvTitle = when (ReadTipConfig.chapterTitle) {
ReadTipConfig.tipHeaderLeft -> tv_header_left
diff --git a/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt b/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt
index 010ebba78..a4330b02e 100644
--- a/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt
+++ b/app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt
@@ -41,7 +41,7 @@ class DetailSeekBar @JvmOverloads constructor(
tv_seek_title.text = typedArray.getText(R.styleable.DetailSeekBar_title)
seek_bar.max = typedArray.getInteger(R.styleable.DetailSeekBar_max, 0)
typedArray.recycle()
- if (isBottomBackground) {
+ if (isBottomBackground && !isInEditMode) {
val isLight = ColorUtils.isColorLight(context.bottomBackground)
val textColor = context.getPrimaryTextColor(isLight)
tv_seek_title.setTextColor(textColor)
diff --git a/app/src/main/res/layout/dialog_read_book_style.xml b/app/src/main/res/layout/dialog_read_book_style.xml
index 1d0fcd6a8..32e1fbae0 100644
--- a/app/src/main/res/layout/dialog_read_book_style.xml
+++ b/app/src/main/res/layout/dialog_read_book_style.xml
@@ -20,25 +20,6 @@
android:layout_height="wrap_content"
android:layout_weight="0.5" />
-
-
-
-
+ android:orientation="vertical"
+ android:padding="16dp">
+ android:text="@string/body_title"
+ android:textSize="18sp" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:padding="6dp"
+ tools:text="@string/show_hide" />
+
+
+
+
+ android:layout_weight="1"
+ android:padding="6dp"
+ android:text="@string/left" />
+ android:padding="6dp"
+ tools:text="@string/title" />
+
+
+
+
+ android:layout_weight="1"
+ android:padding="6dp"
+ android:text="@string/middle" />
+
+
+
+
+
+
+ android:padding="6dp"
+ tools:text="@string/title" />
+ android:text="@string/footer"
+ android:textSize="18sp" />
+
+
+ android:padding="6dp"
+ tools:text="@string/show_hide" />
+
+
+
+
+ android:layout_weight="1"
+ android:padding="6dp"
+ android:text="@string/left" />
+ android:padding="6dp"
+ tools:text="@string/title" />
+
+
+
+
+ android:layout_weight="1"
+ android:padding="6dp"
+ android:text="@string/middle" />
+
+
+
+
+
+
+ android:padding="6dp"
+ tools:text="@string/title" />
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_title_config.xml b/app/src/main/res/layout/dialog_title_config.xml
deleted file mode 100644
index 9480c1602..000000000
--- a/app/src/main/res/layout/dialog_title_config.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_detail_seek_bar.xml b/app/src/main/res/layout/view_detail_seek_bar.xml
index a63c1b8dd..cfcec885f 100644
--- a/app/src/main/res/layout/view_detail_seek_bar.xml
+++ b/app/src/main/res/layout/view_detail_seek_bar.xml
@@ -8,7 +8,7 @@
夜間,強調色
夜間,背景色
夜間,導航欄顏色
- 隱藏頁眉
- 隱藏頁脚
自動換源
置底
文字兩端對齊
@@ -785,5 +783,7 @@
下一页
上一页
无操作
+ 正文标题
+ 显示/隐藏
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 233bc8953..f20602171 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -681,8 +681,6 @@
點擊加入
中
訊息
- 隱藏頁首
- 隱藏頁尾
切換布局
@@ -786,5 +784,7 @@
下一页
上一页
无操作
+ 正文标题
+ 显示/隐藏
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index e8af9544d..3cfdd43b5 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -690,8 +690,6 @@
点击加入
中
信息
- 隐藏页眉
- 隐藏页脚
切换布局
文章字重切换
@@ -789,5 +787,7 @@
下一页
上一页
无操作
+ 正文标题
+ 显示/隐藏
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 940b8c68e..0e5eaba0a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -691,8 +691,6 @@
Tap to join
Middle
Information
- Hide header
- Hide footer
Switch Layout
Text font weight switching
@@ -792,5 +790,7 @@
下一页
上一页
无操作
+ 正文标题
+ 显示/隐藏