优化阅读界面设置

pull/517/head
gedoor 4 years ago
parent 8067cb3efb
commit f2f6abf3b8
  1. 8
      app/src/main/java/io/legado/app/help/ReadBookConfig.kt
  2. 34
      app/src/main/java/io/legado/app/help/ReadTipConfig.kt
  3. 2
      app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt
  4. 2
      app/src/main/java/io/legado/app/lib/theme/view/ATEProgressBar.kt
  5. 2
      app/src/main/java/io/legado/app/lib/theme/view/ATERadioButton.kt
  6. 2
      app/src/main/java/io/legado/app/lib/theme/view/ATESeekBar.kt
  7. 41
      app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
  8. 244
      app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt
  9. 11
      app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt
  10. 2
      app/src/main/java/io/legado/app/ui/widget/DetailSeekBar.kt
  11. 19
      app/src/main/res/layout/dialog_read_book_style.xml
  12. 232
      app/src/main/res/layout/dialog_tip_config.xml
  13. 61
      app/src/main/res/layout/dialog_title_config.xml
  14. 4
      app/src/main/res/layout/view_detail_seek_bar.xml
  15. 4
      app/src/main/res/values-zh-rHK/strings.xml
  16. 4
      app/src/main/res/values-zh-rTW/strings.xml
  17. 4
      app/src/main/res/values-zh/strings.xml
  18. 4
      app/src/main/res/values/strings.xml

@ -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) {

@ -4,7 +4,15 @@ import io.legado.app.App
import io.legado.app.R
object ReadTipConfig {
val tipArray: Array<String> = 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
}
}

@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATECheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
init {
if (!isInEditMode) {
ATH.setTint(this, context.accentColor)
}
}
}

@ -12,6 +12,8 @@ import io.legado.app.lib.theme.ThemeStore
class ATEProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
init {
if (!isInEditMode) {
ATH.setTint(this, ThemeStore.accentColor(context))
}
}
}

@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATERadioButton(context: Context, attrs: AttributeSet) : AppCompatRadioButton(context, attrs) {
init {
if (!isInEditMode) {
ATH.setTint(this@ATERadioButton, context.accentColor)
}
}
}

@ -12,6 +12,8 @@ import io.legado.app.lib.theme.accentColor
class ATESeekBar(context: Context, attrs: AttributeSet) : AppCompatSeekBar(context, attrs) {
init {
if (!isInEditMode) {
ATH.setTint(this, context.accentColor)
}
}
}

@ -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) {

@ -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,213 +39,128 @@ 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)
}
}
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]
}
dsb_title_size.onChanged = {
ReadBookConfig.titleSize = it
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]
}
dsb_title_top.onChanged = {
ReadBookConfig.titleTopSpacing = it
postEvent(EventBus.UP_CONFIG, true)
}
dsb_title_bottom.onChanged = {
ReadBookConfig.titleBottomSpacing = it
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]
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)
}
if (tipHeaderRight == i) {
tipHeaderRight = none
tv_header_right.text = tipArray[none]
}
if (tipFooterMiddle == i) {
tipFooterMiddle = none
tv_footer_middle.text = tipArray[none]
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)
}
if (tipFooterRight == i) {
tipFooterRight = none
tv_footer_right.text = tipArray[none]
}
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)
}
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]
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)
}
if (tipHeaderMiddle == i) {
tipHeaderMiddle = none
tv_header_middle.text = tipArray[none]
}
if (tipHeaderRight == i) {
tipHeaderRight = none
tv_header_right.text = tipArray[none]
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)
}
if (tipFooterLeft == i) {
tipFooterLeft = none
tv_footer_left.text = tipArray[none]
}
if (tipFooterRight == i) {
tipFooterRight = none
tv_footer_right.text = tipArray[none]
}
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)
}
tipFooterMiddle = i
tv_footer_middle.text = tipArray[i]
}
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)
}
}
tv_footer_right.onClick {
selector(items = ReadTipConfig.tipArray.toList()) { _, i ->
ReadTipConfig.apply {
if (i != none) {
if (tipHeaderLeft == i) {
}
private fun clearRepeat(repeat: Int) = ReadTipConfig.apply {
if (repeat != none) {
if (tipHeaderLeft == repeat) {
tipHeaderLeft = none
tv_header_left.text = tipArray[none]
tv_header_left.text = tips[none]
}
if (tipHeaderMiddle == i) {
if (tipHeaderMiddle == repeat) {
tipHeaderMiddle = none
tv_header_middle.text = tipArray[none]
tv_header_middle.text = tips[none]
}
if (tipHeaderRight == i) {
if (tipHeaderRight == repeat) {
tipHeaderRight = none
tv_header_right.text = tipArray[none]
tv_header_right.text = tips[none]
}
if (tipFooterLeft == i) {
if (tipFooterLeft == repeat) {
tipFooterLeft = none
tv_footer_left.text = tipArray[none]
tv_footer_left.text = tips[none]
}
if (tipFooterMiddle == i) {
if (tipFooterMiddle == repeat) {
tipFooterMiddle = none
tv_footer_middle.text = tipArray[none]
}
}
tipFooterRight = i
tv_footer_right.text = tipArray[i]
tv_footer_middle.text = tips[none]
}
postEvent(EventBus.UP_CONFIG, true)
}
}
sw_hide_header.onCheckedChange { buttonView, isChecked ->
if (buttonView?.isPressed == true) {
ReadTipConfig.hideHeader = isChecked
postEvent(EventBus.UP_CONFIG, true)
}
}
sw_hide_footer.onCheckedChange { buttonView, isChecked ->
if (buttonView?.isPressed == true) {
ReadTipConfig.hideFooter = isChecked
postEvent(EventBus.UP_CONFIG, true)
if (tipFooterRight == repeat) {
tipFooterRight = none
tv_footer_right.text = tips[none]
}
}
}

@ -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

@ -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)

@ -20,25 +20,6 @@
android:layout_height="wrap_content"
android:layout_weight="0.5" />
<io.legado.app.ui.widget.text.StrokeTextView
android:id="@+id/tv_title_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:text="@string/title"
android:gravity="center"
android:textSize="14sp"
app:isBottomBackground="true"
app:radius="3dp" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<io.legado.app.ui.book.read.config.TextFontWeightConverter
android:id="@+id/text_font_weight_converter"
android:layout_width="wrap_content"

@ -1,125 +1,273 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical">
android:orientation="vertical"
android:padding="16dp">
<io.legado.app.ui.widget.text.AccentTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/header" />
android:text="@string/body_title"
android:textSize="18sp" />
<RadioGroup
android:id="@+id/rg_title_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_title_mode1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_left" />
<RadioButton
android:id="@+id/rb_title_mode2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_center" />
<RadioButton
android:id="@+id/rb_title_mode3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_hide" />
</RadioGroup>
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="10"
app:title="字号" />
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="100"
app:title="上间距" />
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="100"
app:title="下间距" />
<io.legado.app.ui.widget.text.AccentTextView
android:id="@+id/tv_header_padding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/header"
android:textSize="18sp" />
<LinearLayout
android:id="@+id/ll_header_show"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="12dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="6dp"
android:text="@string/show_hide" />
<TextView
android:id="@+id/tv_header_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="@string/left" />
android:padding="6dp"
tools:text="@string/show_hide" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_header_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:id="@+id/tv_header_left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:padding="6dp"
android:text="@string/left" />
<TextView
android:id="@+id/tv_header_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="@string/middle" />
android:padding="6dp"
tools:text="@string/title" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_header_middle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:id="@+id/tv_header_middle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:padding="6dp"
android:text="@string/middle" />
<TextView
android:id="@+id/tv_header_middle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:padding="6dp"
tools:text="@string/title" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_header_right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="6dp"
android:text="@string/right" />
<TextView
android:id="@+id/tv_header_right"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:padding="6dp"
tools:text="@string/title" />
</LinearLayout>
<io.legado.app.ui.widget.text.AccentTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/footer" />
android:text="@string/footer"
android:textSize="18sp" />
<LinearLayout
android:id="@+id/ll_footer_show"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="12dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="@string/left" />
<TextView
android:id="@+id/tv_footer_left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:padding="6dp"
android:text="@string/show_hide" />
<TextView
android:id="@+id/tv_footer_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="@string/middle" />
android:padding="6dp"
tools:text="@string/show_hide" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_footer_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:id="@+id/tv_footer_middle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:padding="6dp"
android:text="@string/left" />
<TextView
android:id="@+id/tv_footer_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:text="@string/right" />
android:padding="6dp"
tools:text="@string/title" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_footer_middle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:id="@+id/tv_footer_right"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:padding="6dp"
android:text="@string/middle" />
<TextView
android:id="@+id/tv_footer_middle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
tools:text="@string/title" />
</LinearLayout>
<Switch
android:id="@+id/sw_hide_header"
<LinearLayout
android:id="@+id/ll_footer_right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="RtlHardcoded,RtlSymmetry">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="6dp"
android:text="@string/hideHeader" />
android:text="@string/right" />
<Switch
android:id="@+id/sw_hide_footer"
android:layout_width="match_parent"
<TextView
android:id="@+id/tv_footer_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/hideFooter" />
tools:text="@string/title" />
</LinearLayout>
</LinearLayout>

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<RadioGroup
android:id="@+id/rg_title_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_title_mode1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_left" />
<RadioButton
android:id="@+id/rb_title_mode2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_center" />
<RadioButton
android:id="@+id/rb_title_mode3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:text="@string/title_hide" />
</RadioGroup>
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="10"
app:title="字号" />
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="100"
app:title="上间距" />
<io.legado.app.ui.widget.DetailSeekBar
android:id="@+id/dsb_title_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
app:max="100"
app:title="下间距" />
</LinearLayout>

@ -8,7 +8,7 @@
<TextView
android:id="@+id/tv_seek_title"
android:layout_width="50dp"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="seek"
@ -42,7 +42,7 @@
<TextView
android:id="@+id/tv_seek_value"
android:layout_width="40dp"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"

@ -695,8 +695,6 @@
<string name="night_accent">夜間,強調色</string>
<string name="night_background_color">夜間,背景色</string>
<string name="night_navbar_color">夜間,導航欄顏色</string>
<string name="hideHeader">隱藏頁眉</string>
<string name="hideFooter">隱藏頁脚</string>
<string name="auto_change_source">自動換源</string>
<string name="to_bottom">置底</string>
<string name="text_full_justify">文字兩端對齊</string>
@ -785,5 +783,7 @@
<string name="next_page">下一页</string>
<string name="prev_page">上一页</string>
<string name="non_action">无操作</string>
<string name="body_title">正文标题</string>
<string name="show_hide">显示/隐藏</string>
</resources>

@ -681,8 +681,6 @@
<string name="click_to_apply">點擊加入</string>
<string name="middle"></string>
<string name="information">訊息</string>
<string name="hideHeader">隱藏頁首</string>
<string name="hideFooter">隱藏頁尾</string>
<string name="switchLayout">切換布局</string>
<!--color-->
@ -786,5 +784,7 @@
<string name="next_page">下一页</string>
<string name="prev_page">上一页</string>
<string name="non_action">无操作</string>
<string name="body_title">正文标题</string>
<string name="show_hide">显示/隐藏</string>
</resources>

@ -690,8 +690,6 @@
<string name="click_to_apply">点击加入</string>
<string name="middle"></string>
<string name="information">信息</string>
<string name="hideHeader">隐藏页眉</string>
<string name="hideFooter">隐藏页脚</string>
<string name="switchLayout">切换布局</string>
<string name="text_font_weight_converter">文章字重切换</string>
@ -789,5 +787,7 @@
<string name="next_page">下一页</string>
<string name="prev_page">上一页</string>
<string name="non_action">无操作</string>
<string name="body_title">正文标题</string>
<string name="show_hide">显示/隐藏</string>
</resources>

@ -691,8 +691,6 @@
<string name="click_to_apply">Tap to join</string>
<string name="middle">Middle</string>
<string name="information">Information</string>
<string name="hideHeader">Hide header</string>
<string name="hideFooter">Hide footer</string>
<string name="switchLayout">Switch Layout</string>
<string name="text_font_weight_converter">Text font weight switching</string>
@ -792,5 +790,7 @@
<string name="next_page">下一页</string>
<string name="prev_page">上一页</string>
<string name="non_action">无操作</string>
<string name="body_title">正文标题</string>
<string name="show_hide">显示/隐藏</string>
</resources>

Loading…
Cancel
Save