Merge pull request #167 from yangyxd/master

调整"我的"UI
pull/169/head
kunfei 5 years ago committed by GitHub
commit 86038b1782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt
  2. 22
      app/src/main/java/io/legado/app/ui/widget/prefs/EditTextPreference.kt
  3. 11
      app/src/main/java/io/legado/app/ui/widget/prefs/IconListPreference.kt
  4. 7
      app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt
  5. 101
      app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt
  6. 27
      app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt
  7. 12
      app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt
  8. 10
      app/src/main/res/drawable/bg_prefs_color.xml
  9. 15
      app/src/main/res/drawable/ic_cfg_about.xml
  10. 9
      app/src/main/res/drawable/ic_cfg_backup.xml
  11. 5
      app/src/main/res/drawable/ic_cfg_e_lnk.xml
  12. 12
      app/src/main/res/drawable/ic_cfg_jz.xml
  13. 12
      app/src/main/res/drawable/ic_cfg_other.xml
  14. 12
      app/src/main/res/drawable/ic_cfg_replace.xml
  15. 12
      app/src/main/res/drawable/ic_cfg_source.xml
  16. 9
      app/src/main/res/drawable/ic_cfg_theme.xml
  17. 9
      app/src/main/res/drawable/ic_cfg_web.xml
  18. 67
      app/src/main/res/layout/view_preference.xml
  19. 29
      app/src/main/res/layout/view_preference_category.xml
  20. 1
      app/src/main/res/values-night/colors.xml
  21. 1
      app/src/main/res/values/colors.xml
  22. 5
      app/src/main/res/values/strings.xml
  23. 30
      app/src/main/res/xml/about.xml
  24. 25
      app/src/main/res/xml/donate.xml
  25. 24
      app/src/main/res/xml/pref_config_backup.xml
  26. 16
      app/src/main/res/xml/pref_config_other.xml
  27. 14
      app/src/main/res/xml/pref_config_theme.xml
  28. 44
      app/src/main/res/xml/pref_main.xml

@ -6,14 +6,24 @@ import android.content.res.TypedArray
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.util.AttributeSet import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.SwitchCompat
import androidx.core.view.isVisible
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder import androidx.preference.PreferenceViewHolder
import com.jaredrummler.android.colorpicker.* import com.jaredrummler.android.colorpicker.*
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import org.jetbrains.anko.layoutInflater
import org.jetbrains.anko.px2dip
class ColorPreference(context: Context, attrs: AttributeSet) : Preference(context, attrs), class ColorPreference(context: Context, attrs: AttributeSet) : Preference(context, attrs),
ColorPickerDialogListener { ColorPickerDialogListener {
@ -37,6 +47,8 @@ class ColorPreference(context: Context, attrs: AttributeSet) : Preference(contex
init { init {
isPersistent = true isPersistent = true
layoutResource = io.legado.app.R.layout.view_preference
val a = context.obtainStyledAttributes(attrs, R.styleable.ColorPreference) val a = context.obtainStyledAttributes(attrs, R.styleable.ColorPreference)
showDialog = a.getBoolean(R.styleable.ColorPreference_cpv_showDialog, true) showDialog = a.getBoolean(R.styleable.ColorPreference_cpv_showDialog, true)
@ -110,8 +122,11 @@ class ColorPreference(context: Context, attrs: AttributeSet) : Preference(contex
override fun onBindViewHolder(holder: PreferenceViewHolder) { override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
val preview = holder.itemView.findViewById(R.id.cpv_preference_preview_color_panel) as ColorPanelView val v = io.legado.app.ui.widget.prefs.Preference.bindView<ColorPanelView>(context, holder, icon, title, summary, widgetLayoutResource,
preview.color = color io.legado.app.R.id.cpv_preference_preview_color_panel, 30, 30)
if (v is ColorPanelView) {
v?.color = color
}
} }
override fun onSetInitialValue(defaultValue: Any?) { override fun onSetInitialValue(defaultValue: Any?) {

@ -0,0 +1,22 @@
package io.legado.app.ui.widget.prefs
import android.content.Context
import android.util.AttributeSet
import android.widget.TextView
import androidx.preference.PreferenceViewHolder
import io.legado.app.R
class EditTextPreference(context: Context, attrs: AttributeSet) : androidx.preference.EditTextPreference(context, attrs) {
init {
// isPersistent = true
layoutResource = R.layout.view_preference
}
override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder)
val txt = if (text == null || text.isEmpty()) summary else text
val v = Preference.bindView<TextView>(context, holder, icon, title, txt, null, null)
}
}

@ -10,17 +10,22 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView
import androidx.core.view.isVisible
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.PreferenceViewHolder import androidx.preference.PreferenceViewHolder
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.jaredrummler.android.colorpicker.ColorPanelView
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.getCompatDrawable import io.legado.app.utils.getCompatDrawable
import kotlinx.android.synthetic.main.dialog_recycler_view.* import kotlinx.android.synthetic.main.dialog_recycler_view.*
import kotlinx.android.synthetic.main.item_icon_preference.view.* import kotlinx.android.synthetic.main.item_icon_preference.view.*
import org.jetbrains.anko.layoutInflater
import org.jetbrains.anko.sdk27.listeners.onClick import org.jetbrains.anko.sdk27.listeners.onClick
@ -29,6 +34,7 @@ class IconListPreference(context: Context, attrs: AttributeSet) : ListPreference
private val mEntryDrawables = arrayListOf<Drawable?>() private val mEntryDrawables = arrayListOf<Drawable?>()
init { init {
layoutResource = io.legado.app.R.layout.view_preference
widgetLayoutResource = R.layout.view_icon widgetLayoutResource = R.layout.view_icon
val a = context.theme.obtainStyledAttributes(attrs, R.styleable.IconListPreference, 0, 0) val a = context.theme.obtainStyledAttributes(attrs, R.styleable.IconListPreference, 0, 0)
@ -52,11 +58,12 @@ class IconListPreference(context: Context, attrs: AttributeSet) : ListPreference
override fun onBindViewHolder(holder: PreferenceViewHolder?) { override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
holder?.itemView?.findViewById<ImageView>(R.id.preview)?.let { val v = Preference.bindView<ImageView>(context, holder, icon, title, summary, widgetLayoutResource, R.id.preview, 50, 50)
if (v is ImageView) {
val selectedIndex = findIndexOfValue(value) val selectedIndex = findIndexOfValue(value)
if (selectedIndex >= 0) { if (selectedIndex >= 0) {
val drawable = mEntryDrawables[selectedIndex] val drawable = mEntryDrawables[selectedIndex]
it.setImageDrawable(drawable) v?.setImageDrawable(drawable)
} }
} }
} }

@ -11,12 +11,15 @@ import io.legado.app.R
class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference(context, attrs) { class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference(context, attrs) {
init { init {
layoutResource = R.layout.view_preference
widgetLayoutResource = R.layout.item_fillet_text widgetLayoutResource = R.layout.item_fillet_text
} }
override fun onBindViewHolder(holder: PreferenceViewHolder?) { override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
val textView = holder?.itemView?.findViewById<TextView>(R.id.text_view) val v = Preference.bindView<TextView>(context, holder, icon, title, summary, widgetLayoutResource, R.id.text_view)
textView?.text = entry if (v is TextView) {
v?.text = entry
}
} }
} }

@ -0,0 +1,101 @@
package io.legado.app.ui.widget.prefs
import android.content.Context
import android.content.ContextWrapper
import android.content.res.TypedArray
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.media.Image
import android.os.Bundle
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.ColorInt
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.SwitchCompat
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.fragment.app.FragmentActivity
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.jaredrummler.android.colorpicker.*
import io.legado.app.lib.theme.ATH
import io.legado.app.R
import io.legado.app.lib.theme.accentColor
import org.jetbrains.anko.imageBitmap
import org.jetbrains.anko.layoutInflater
import kotlin.math.roundToInt
class Preference(context: Context, attrs: AttributeSet) : androidx.preference.Preference(context, attrs) {
init {
// isPersistent = true
layoutResource = R.layout.view_preference
}
companion object {
fun <T: View> bindView(context: Context, it: PreferenceViewHolder?, icon: Drawable?, title: CharSequence?, summary: CharSequence?, weightLayoutRes: Int?, viewId: Int?,
weightWidth: Int = 0, weightHeight: Int = 0): T? {
if (it == null) return null
val view = it.findViewById(R.id.preference_title)
if (view is TextView) { // && !view.isInEditMode
view.text = title
view.isVisible = title != null && title.isNotEmpty()
val tv_summary = it.findViewById(R.id.preference_desc)
if(tv_summary is TextView) {
tv_summary.text = summary
tv_summary.isVisible = summary != null && summary.isNotEmpty()
}
val _icon = it.findViewById(R.id.preference_icon)
if (_icon is ImageView) {
_icon.isVisible = icon != null && icon.isVisible
_icon.setImageDrawable(icon)
_icon.setColorFilter(context.accentColor)
}
}
if (weightLayoutRes != null && weightLayoutRes != 0 && viewId != null && viewId != 0) {
val lay = it.findViewById(R.id.preference_widget)
if (lay is FrameLayout) {
var v = it.itemView.findViewById<T>(viewId)
if (v == null) {
val inflater: LayoutInflater = context.layoutInflater
val childView = inflater.inflate(weightLayoutRes, null)
lay.removeAllViews()
lay.addView(childView)
lay.isVisible = true
v = lay.findViewById<T>(viewId)
}
if (weightWidth > 0 || weightHeight > 0) {
val lp = lay.layoutParams
if (weightHeight > 0)
lp.height = (context.resources.displayMetrics.density * weightHeight).roundToInt()
if (weightWidth > 0)
lp.width = (context.resources.displayMetrics.density * weightWidth).roundToInt()
lay.layoutParams = lp
}
return v
}
}
return null
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder)
bindView<View>(context, holder, icon, title, summary, null, null)
}
}

@ -1,22 +1,41 @@
package io.legado.app.ui.widget.prefs package io.legado.app.ui.widget.prefs
import android.content.Context import android.content.Context
import android.graphics.Color
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View
import android.widget.TextView import android.widget.TextView
import androidx.core.view.isVisible
import androidx.preference.PreferenceCategory import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceViewHolder import androidx.preference.PreferenceViewHolder
import io.legado.app.R
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
class PreferenceCategory(context: Context, attrs: AttributeSet) : class PreferenceCategory(context: Context, attrs: AttributeSet) : PreferenceCategory(context, attrs) {
PreferenceCategory(context, attrs) {
init {
isPersistent = true
layoutResource = R.layout.view_preference_category
}
override fun onBindViewHolder(holder: PreferenceViewHolder?) { override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
holder?.let { holder?.let {
val view = it.findViewById(android.R.id.title) val view = it.findViewById(R.id.preference_title)
if (view is TextView && !view.isInEditMode) { if (view is TextView) { // && !view.isInEditMode
view.text = title
view.setTextColor(context.accentColor) //设置title文本的颜色 view.setTextColor(context.accentColor) //设置title文本的颜色
view.isVisible = title != null && title.isNotEmpty()
val da = it.findViewById(R.id.preference_divider_above)
if (da is View) {
da.isVisible = it.isDividerAllowedAbove
}
val db = it.findViewById(R.id.preference_divider_below)
if (db is View) {
db.isVisible = it.isDividerAllowedBelow
}
} }
} }
} }

@ -12,13 +12,15 @@ import io.legado.app.lib.theme.accentColor
class SwitchPreference(context: Context, attrs: AttributeSet) : class SwitchPreference(context: Context, attrs: AttributeSet) :
SwitchPreferenceCompat(context, attrs) { SwitchPreferenceCompat(context, attrs) {
init {
layoutResource = R.layout.view_preference
}
override fun onBindViewHolder(holder: PreferenceViewHolder?) { override fun onBindViewHolder(holder: PreferenceViewHolder?) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
holder?.let { val v = Preference.bindView<SwitchCompat>(context, holder, icon, title, summary, widgetLayoutResource, R.id.switchWidget)
val view = it.findViewById(R.id.switchWidget) if (v is SwitchCompat) {
if (view is SwitchCompat) { ATH.setTint(v, context.accentColor)
ATH.setTint(view, context.accentColor)
}
} }
} }

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/btn_bg_press">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/background_prefs" />
<corners android:radius="0dp" />
</shape>
</item>
</ripple>

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,4.5A7.5,7.5 0,1 1,4.5 12,7.5 7.5,0 0,1 12,4.5M12,3a9,9 0,1 0,9 9,9 9,0 0,0 -9,-9Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M11.25,10.5h1.5v6h-1.5z"/>
<path
android:fillColor="#FF000000"
android:pathData="M12,8.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M9.94,4H5A2,2 0,0 0,3 6V18a2,2 0,0 0,2 2H19a2,2 0,0 0,2 -2V8a2,2 0,0 0,-2 -2H13.23a1.49,1.49 0,0 1,-1 -0.42L11,4.42a1.49,1.49 0,0 0,-1 -0.42ZM4.5,9.25V6A0.5,0.5 0,0 1,5 5.5H9.94l1.21,1.16a3,3 0,0 0,2.08 0.84H19a0.5,0.5 0,0 1,0.5 0.5V9.25ZM5,18.5a0.5,0.5 0,0 1,-0.5 -0.5V10.75h15V18a0.5,0.5 0,0 1,-0.5 0.5Z"/>
</vector>

@ -0,0 +1,5 @@
<vector android:height="32dp" android:viewportHeight="24"
android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,4.5A7.5,7.5 0,1 1,4.5 12,7.5 7.5,0 0,1 12,4.5M12,3a9,9 0,1 0,9 9,9 9,0 0,0 -9,-9Z"/>
<path android:fillColor="#FF000000" android:pathData="M12,5.25v13.5a6.75,6.75 0,0 0,0 -13.5Z"/>
</vector>

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,4.5A7.5,7.5 0,1 1,4.5 12,7.5 7.5,0 0,1 12,4.5M12,3a9,9 0,1 0,9 9,9 9,0 0,0 -9,-9Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M15.01,7.25l-1.49,0l-1.51,2.59l-1.5,-2.59l-1.5,0l1.6,2.75l-1.6,0l0,1.5l2.24,0l0,1l-2.24,0l0,1.5l2.24,0l0,2.75l1.5,0l0,-2.75l2.24,0l0,-1.5l-2.24,0l0,-1l2.24,0l0,-1.5l-1.58,0l1.6,-2.75z"/>
</vector>

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,10.5A1.5,1.5 0,1 1,10.5 12,1.5 1.5,0 0,1 12,10.5M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M15.62,5.5h0L19.28,12l-3.66,6.5H8.38L4.72,12 8.38,5.5h7.24m0,-1.5H8.38a1.5,1.5 0,0 0,-1.31 0.77L3.41,11.26a1.55,1.55 0,0 0,0 1.48l3.66,6.49A1.5,1.5 0,0 0,8.38 20h7.24a1.5,1.5 0,0 0,1.31 -0.77l3.66,-6.49a1.55,1.55 0,0 0,0 -1.48L16.93,4.77A1.5,1.5 0,0 0,15.62 4Z"/>
</vector>

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M10.84,19.2V17.8a5.1,5.1 0,0 1,-5.13 -4.2,0.64 0.64,0 0,1 0.68,-0.7 0.87,0.87 0,0 1,0.82 0.69,3.66 3.66,0 0,0 3.63,2.81V15l3,2.1 -3,2.1Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M5.93,3 L3,10.52L4.61,10.52l0.62,-1.71h3l0.66,1.71h1.65L7.53,3ZM5.7,7.54l1,-2.79 1,2.79ZM20.63,17.69A2,2 0,0 0,19.57 17a1.76,1.76 0,0 0,0.78 -0.67,1.79 1.79,0 0,0 0,-1.84 2,2 0,0 0,-0.58 -0.63,1.91 1.91,0 0,0 -0.78,-0.31 8.48,8.48 0,0 0,-1.33 -0.08h-3L14.66,21h2.56c1,0 1.58,0 1.83,-0.05a2.21,2.21 0,0 0,1 -0.36,2 2,0 0,0 0.65,-0.77 2.23,2.23 0,0 0,0.24 -1A1.78,1.78 0,0 0,20.63 17.69ZM16.22,14.69h0.87c0.72,0 1.15,0 1.3,0A0.9,0.9 0,0 1,19 15a0.84,0.84 0,0 1,0.19 0.57,0.8 0.8,0 0,1 -0.22,0.59 1,1 0,0 1,-0.61 0.27c-0.14,0 -0.51,0 -1.1,0h-1ZM19.22,19.35a0.94,0.94 0,0 1,-0.55 0.3,7.41 7.41,0 0,1 -1,0L16.22,19.65v-2h1.23a5.11,5.11 0,0 1,1.34 0.11,1 1,0 0,1 0.48,0.34 1,1 0,0 1,0.16 0.58,0.93 0.93,0 0,1 -0.21,0.64Z"/>
</vector>

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M20.59,4.2A15,15 0,0 0,18.12 4,20 20,0 0,0 12,5 20,20 0,0 0,5.88 4a15,15 0,0 0,-2.47 0.2c-0.24,0 -0.41,0.25 -0.41,1.1L3,18.68a0.48,0.48 0,0 0,0.49 0.48h0.08A14.08,14.08 0,0 1,5.88 19a19.58,19.58 0,0 1,5.39 0.8L12,20l0.66,-0.2A19.85,19.85 0,0 1,18.12 19a14.08,14.08 0,0 1,2.31 0.18h0.08a0.48,0.48 0,0 0,0.49 -0.49L21,4.7A0.5,0.5 0,0 0,20.59 4.2ZM11.27,18.2a21.47,21.47 0,0 0,-5.39 -0.74c-0.48,0 -1,0 -1.42,0.06v-12A13.24,13.24 0,0 1,5.88 5.5a19,19 0,0 1,5.39 0.85ZM19.54,17.52c-0.46,0 -0.94,-0.06 -1.42,-0.06a21.27,21.27 0,0 0,-5.39 0.74L12.73,6.35a19.14,19.14 0,0 1,5.39 -0.85,13.11 13.11,0 0,1 1.42,0.07Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M18.12,8.45l0.5,0V7l-0.5,0a19.49,19.49 0,0 0,-4.5 0.56V9.05A18.3,18.3 0,0 1,18.12 8.45Z"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M20.37,4.75 L16,3H14.29A2.5,2.5 0,0 1,9.71 3H8L3.63,4.75A1,1 0,0 0,3 5.68V10a1.05,1.05 0,0 0,1 1.05,1 1,0 0,0 0.3,-0.05L6.5,10v9a2,2 0,0 0,2 2h7a2,2 0,0 0,2 -2V10l2.18,1A1,1 0,0 0,21 10V5.68A1,1 0,0 0,20.37 4.75ZM19.5,9.27 L16.72,8a0.51,0.51 0,0 0,-0.72 0.46V19a0.5,0.5 0,0 1,-0.5 0.5h-7A0.5,0.5 0,0 1,8 19V8.45A0.5,0.5 0,0 0,7.29 8L4.5,9.27V6L8.29,4.5H8.9a4,4 0,0 0,6.2 0h0.61L19.5,6Z"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M19.62,7.23A8.83,8.83 0,0 0,18.72 6,9 9,0 0,0 13.24,3.1 3.86,3.86 0,0 0,12.75 3c-0.25,0 -0.5,0 -0.75,0s-0.5,0 -0.75,0a3.86,3.86 0,0 0,-0.49 0.06A9,9 0,0 0,5.28 6a8.83,8.83 0,0 0,-0.9 1.21,8.93 8.93,0 0,0 0,9.54A8.83,8.83 0,0 0,5.28 18a9,9 0,0 0,5.48 2.92,3.86 3.86,0 0,0 0.49,0.06c0.25,0 0.5,0 0.75,0s0.5,0 0.75,0a3.86,3.86 0,0 0,0.49 -0.06A9,9 0,0 0,18.72 18a8.83,8.83 0,0 0,0.9 -1.21,8.93 8.93,0 0,0 0,-9.54ZM19.46,11.23L16,11.23A13.84,13.84 0,0 0,15.67 9a13.7,13.7 0,0 0,2.65 -1A7.36,7.36 0,0 1,19.46 11.25ZM17.37,6.77a12.57,12.57 0,0 1,-2.1 0.78A13.83,13.83 0,0 0,14 4.77,7.56 7.56,0 0,1 17.37,6.77ZM12,14.5a14.51,14.51 0,0 0,-2.2 0.19,12.41 12.41,0 0,1 -0.26,-1.94h4.92a12.41,12.41 0,0 1,-0.26 1.94A14.51,14.51 0,0 0,12 14.5ZM13.78,16.14A12.69,12.69 0,0 1,12 19.47a12.69,12.69 0,0 1,-1.78 -3.33A13,13 0,0 1,12 16,13 13,0 0,1 13.78,16.14ZM9.54,11.25A12.41,12.41 0,0 1,9.8 9.31,14.51 14.51,0 0,0 12,9.5a14.51,14.51 0,0 0,2.2 -0.19,12.41 12.41,0 0,1 0.26,1.94ZM10.22,7.86A12.69,12.69 0,0 1,12 4.53a12.69,12.69 0,0 1,1.78 3.33A13,13 0,0 1,12 8,13 13,0 0,1 10.22,7.86ZM10,4.77a13.83,13.83 0,0 0,-1.3 2.78,12.57 12.57,0 0,1 -2.1,-0.78A7.56,7.56 0,0 1,10 4.77ZM8.33,9A13.84,13.84 0,0 0,8 11.25L4.54,11.25A7.36,7.36 0,0 1,5.68 8,13.7 13.7,0 0,0 8.33,9ZM4.54,12.75L8,12.75A13.84,13.84 0,0 0,8.33 15a13.7,13.7 0,0 0,-2.65 1A7.36,7.36 0,0 1,4.54 12.75ZM6.63,17.23a12.57,12.57 0,0 1,2.1 -0.78A13.83,13.83 0,0 0,10 19.23,7.56 7.56,0 0,1 6.63,17.23ZM13.97,19.23a13.83,13.83 0,0 0,1.3 -2.78,12.57 12.57,0 0,1 2.1,0.78A7.56,7.56 0,0 1,14 19.23ZM15.67,15A13.84,13.84 0,0 0,16 12.75h3.5A7.36,7.36 0,0 1,18.32 16,13.7 13.7,0 0,0 15.67,15Z"/>
</vector>

@ -0,0 +1,67 @@
<?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:background="@drawable/bg_prefs_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingTop="10dp"
android:paddingRight="16dp"
android:paddingBottom="4dp"
android:minHeight="42dp"
android:clickable="true"
android:orientation="horizontal" >
<ImageView android:id="@+id/preference_icon"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginRight="16dp"
android:scaleType="fitCenter"
android:visibility="visible"
android:paddingTop="1dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<LinearLayout
android:orientation="vertical"
android:layout_weight="1.0"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/preference_title"
android:paddingBottom="8dp"
android:singleLine="true"
android:textSize="16sp"
android:text="@string/title"
android:textColor="@color/tv_text_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/preference_desc"
android:paddingBottom="8dp"
android:singleLine="true"
android:textSize="14sp"
android:textColor="@color/tv_text_summary"
android:text="@string/default1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<FrameLayout
android:id="@+id/preference_widget"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:gravity="right|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</FrameLayout>
</LinearLayout>

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<View
android:id="@+id/preference_divider_above"
android:layout_width="match_parent"
android:layout_height="8dp" />
<TextView
android:id="@+id/preference_title"
android:paddingTop="16dip"
android:paddingBottom="8dip"
android:background="@drawable/bg_prefs_color"
android:paddingLeft="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<View
android:id="@+id/preference_divider_below"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="8dp" />
</LinearLayout>

@ -7,6 +7,7 @@
<color name="background">@color/md_grey_900</color> <color name="background">@color/md_grey_900</color>
<color name="background_card">@color/md_grey_850</color> <color name="background_card">@color/md_grey_850</color>
<color name="background_menu">@color/md_grey_800</color> <color name="background_menu">@color/md_grey_800</color>
<color name="background_prefs">#10303030</color>
<color name="night_mask">#69000000</color> <color name="night_mask">#69000000</color>

@ -16,6 +16,7 @@
<color name="background">@color/md_grey_50</color> <color name="background">@color/md_grey_50</color>
<color name="background_card">@color/md_grey_100</color> <color name="background_card">@color/md_grey_100</color>
<color name="background_menu">@color/md_grey_200</color> <color name="background_menu">@color/md_grey_200</color>
<color name="background_prefs">@color/md_grey_50</color>
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>
<color name="transparent10">#10000000</color> <color name="transparent10">#10000000</color>

@ -29,6 +29,7 @@
<string name="delete">删除</string> <string name="delete">删除</string>
<string name="replace">替换</string> <string name="replace">替换</string>
<string name="replace_purify">替换净化</string> <string name="replace_purify">替换净化</string>
<string name="replace_purify_desc">配置替换净化规则</string>
<string name="not_available">暂无</string> <string name="not_available">暂无</string>
<string name="enable">启用</string> <string name="enable">启用</string>
<string name="replace_purify_search">替换净化-搜索</string> <string name="replace_purify_search">替换净化-搜索</string>
@ -58,6 +59,7 @@
<string name="book_local">添加本地</string> <string name="book_local">添加本地</string>
<string name="book_source">书源</string> <string name="book_source">书源</string>
<string name="book_source_manage">书源管理</string> <string name="book_source_manage">书源管理</string>
<string name="book_source_manage_desc">新建/导入/编辑/管理书源</string>
<string name="setting">设置</string> <string name="setting">设置</string>
<string name="theme_setting">主题设置</string> <string name="theme_setting">主题设置</string>
<string name="theme_setting_s">与界面/颜色相关的一些设置</string> <string name="theme_setting_s">与界面/颜色相关的一些设置</string>
@ -80,6 +82,7 @@
<string name="is_loading">加载中…</string> <string name="is_loading">加载中…</string>
<string name="retry">重试</string> <string name="retry">重试</string>
<string name="web_service">Web 服务</string> <string name="web_service">Web 服务</string>
<string name="web_service_desc">启用Web服务</string>
<string name="web_edit_source">web编辑书源</string> <string name="web_edit_source">web编辑书源</string>
<string name="http_ip">http://%1$s:%2$d</string> <string name="http_ip">http://%1$s:%2$d</string>
<string name="download_offline">离线下载</string> <string name="download_offline">离线下载</string>
@ -442,6 +445,7 @@
<string name="click_on_selected_show_menu">选中时点击可弹出菜单</string> <string name="click_on_selected_show_menu">选中时点击可弹出菜单</string>
<string name="theme">主题</string> <string name="theme">主题</string>
<string name="theme_mode">主题模式</string> <string name="theme_mode">主题模式</string>
<string name="theme_mode_desc">选择主题模式</string>
<string name="default_theme">默认主题</string> <string name="default_theme">默认主题</string>
<string name="restore_default_theme">恢复主题为默认配色</string> <string name="restore_default_theme">恢复主题为默认配色</string>
<string name="join_qq_group">加入QQ群</string> <string name="join_qq_group">加入QQ群</string>
@ -457,6 +461,7 @@
<string name="import_per">导入本地书籍需存储权限</string> <string name="import_per">导入本地书籍需存储权限</string>
<string name="night_theme">夜间模式</string> <string name="night_theme">夜间模式</string>
<string name="eink_theme">E-Ink 模式</string> <string name="eink_theme">E-Ink 模式</string>
<string name="eink_theme_desc">电子墨水屏模式</string>
<string name="get_storage_per">本软件需要存储权限来存储备份书籍信息</string> <string name="get_storage_per">本软件需要存储权限来存储备份书籍信息</string>
<string name="double_click_exit">再按一次退出程序</string> <string name="double_click_exit">再按一次退出程序</string>
<string name="import_book_per">导入本地书籍需存储权限</string> <string name="import_book_per">导入本地书籍需存储权限</string>

@ -2,68 +2,78 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="contributors" android:key="contributors"
android:title="开发人员" android:title="开发人员"
android:summary="gedoor,Invinciblelee等, 详情请在github中查看" android:summary="gedoor,Invinciblelee等, 详情请在github中查看"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="check_update" android:key="check_update"
android:title="@string/check_update" android:title="@string/check_update"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="update_log" android:key="update_log"
android:title="@string/update_log" android:title="@string/update_log"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="联系我们" android:title="联系我们"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="gzGzh" android:key="gzGzh"
android:title="关注公众号" android:title="关注公众号"
android:summary="开源阅读软件" android:summary="开源阅读软件"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="qq" android:key="qq"
android:title="@string/join_qq_group" android:title="@string/join_qq_group"
android:summary="点击加入" android:summary="点击加入"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="mail" android:key="mail"
android:title="@string/send_mail" android:title="@string/send_mail"
android:summary="kunfei.ge@gmail.com" android:summary="kunfei.ge@gmail.com"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="git" android:key="git"
android:title="@string/git_hub" android:title="@string/git_hub"
android:summary="@string/this_github_url" android:summary="@string/this_github_url"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="home_page" android:key="home_page"
android:title="@string/home_page" android:title="@string/home_page"
android:summary="@string/home_page_url" android:summary="@string/home_page_url"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="其它" android:title="其它"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="license" android:key="license"
android:title="开源许可" android:title="开源许可"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="disclaimer" android:key="disclaimer"
android:title="@string/disclaimer" android:title="@string/disclaimer"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />

@ -4,51 +4,64 @@
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="微信" android:title="微信"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="gzGzh" android:key="gzGzh"
android:title="关注公众号" android:title="关注公众号"
android:summary="关注[开源阅读软件]点击广告支持我" android:summary="关注[开源阅读软件]点击广告支持我"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="wxZsm" android:key="wxZsm"
android:title="微信赞赏码" android:title="微信赞赏码"
android:summary="点击打开" android:summary="点击打开"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="支付宝" android:title="支付宝"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="zfbHbSsm" android:key="zfbHbSsm"
android:title="支付宝红包搜索码" android:title="支付宝红包搜索码"
android:summary="537954522 点击复制" android:summary="537954522 点击复制"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="zfbHbRwm" android:key="zfbHbRwm"
android:title="支付宝红包二维码" android:title="支付宝红包二维码"
android:summary="点击打开" android:summary="点击打开"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="zfbSkRwm" android:key="zfbSkRwm"
android:title="支付宝收款二维码" android:title="支付宝收款二维码"
android:summary="点击打开" android:summary="点击打开"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="QQ" android:title="QQ"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="qqSkRwm" android:key="qqSkRwm"
android:title="QQ收款二维码" android:title="QQ收款二维码"
android:summary="点击打开" android:summary="点击打开"

@ -4,21 +4,24 @@
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/web_dav_set" android:title="@string/web_dav_set"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.EditTextPreference <io.legado.app.ui.widget.prefs.EditTextPreference
android:key="web_dav_url" android:key="web_dav_url"
android:title="WebDav 服务器地址" android:title="WebDav 服务器地址"
android:summary="@string/web_dav_url_s" android:summary="@string/web_dav_url_s"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.EditTextPreference <io.legado.app.ui.widget.prefs.EditTextPreference
android:key="web_dav_account" android:key="web_dav_account"
android:title="WebDav 账号" android:title="WebDav 账号"
android:summary="@string/web_dav_account_s" android:summary="@string/web_dav_account_s"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.EditTextPreference <io.legado.app.ui.widget.prefs.EditTextPreference
android:key="web_dav_password" android:key="web_dav_password"
android:title="WebDav 密码" android:title="WebDav 密码"
android:summary="@string/web_dav_pw_s" android:summary="@string/web_dav_pw_s"
@ -29,28 +32,33 @@
android:defaultValue="true" android:defaultValue="true"
android:title="创建子文件夹" android:title="创建子文件夹"
android:summary="创建legado文件夹作为备份文件夹" android:summary="创建legado文件夹作为备份文件夹"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory app:iconSpaceReserved="false"> <io.legado.app.ui.widget.prefs.PreferenceCategory
app:layout="@layout/view_preference_category"
app:allowDividerBelow="false"
app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="backupUri" android:key="backupUri"
android:title="备份路径" android:title="备份路径"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="web_dav_backup" android:key="web_dav_backup"
android:title="备份" android:title="备份"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="web_dav_restore" android:key="web_dav_restore"
android:title="恢复" android:title="恢复"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="import_old" android:key="import_old"
android:title="导入旧版本数据" android:title="导入旧版本数据"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />

@ -4,6 +4,9 @@
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/main_activity" android:title="@string/main_activity"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
@ -24,30 +27,35 @@
android:defaultValue="true" android:defaultValue="true"
android:key="showRss" android:key="showRss"
android:title="@string/show_rss" android:title="@string/show_rss"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/other_setting" android:title="@string/other_setting"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<Preference <io.legado.app.ui.widget.prefs.Preference
android:key="threadCount" android:key="threadCount"
android:title="@string/threads_num_title" android:title="@string/threads_num_title"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<Preference <io.legado.app.ui.widget.prefs.Preference
android:key="webPort" android:key="webPort"
android:title="@string/web_port_title" android:title="@string/web_port_title"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<Preference <io.legado.app.ui.widget.prefs.Preference
android:key="downloadPath" android:key="downloadPath"
android:title="@string/download_path" android:title="@string/download_path"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<Preference <io.legado.app.ui.widget.prefs.Preference
android:key="cleanCache" android:key="cleanCache"
android:title="@string/cleanCache" android:title="@string/cleanCache"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />

@ -26,21 +26,26 @@
android:title="@string/navigation_bar_color_change" android:title="@string/navigation_bar_color_change"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:defaultValue="true" android:defaultValue="true"
android:key="barElevation" android:key="barElevation"
android:summary="@string/bar_elevation_s" android:summary="@string/bar_elevation_s"
android:title="@string/bar_elevation" android:title="@string/bar_elevation"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="defaultTheme" android:key="defaultTheme"
android:summary="@string/restore_default_theme" android:summary="@string/restore_default_theme"
android:title="@string/default_theme" android:title="@string/default_theme"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="白天" android:title="白天"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<io.legado.app.ui.widget.prefs.ColorPreference <io.legado.app.ui.widget.prefs.ColorPreference
@ -73,12 +78,17 @@
android:summary="白天,底栏色" android:summary="白天,底栏色"
android:title="底部操作栏颜色" android:title="底部操作栏颜色"
app:cpv_dialogType="preset" app:cpv_dialogType="preset"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="夜间" android:title="夜间"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<io.legado.app.ui.widget.prefs.ColorPreference <io.legado.app.ui.widget.prefs.ColorPreference

@ -1,15 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto"
android:divider="@color/transparent"
app:allowDividerBelow="false"
app:allowDividerAbove="false"
>
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="bookSourceManage" android:key="bookSourceManage"
android:title="@string/book_source_manage" android:title="@string/book_source_manage"
android:summary="@string/book_source_manage_desc"
android:icon="@drawable/ic_cfg_source"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="replaceManage" android:key="replaceManage"
android:title="@string/replace_purify" android:title="@string/replace_purify"
android:summary="@string/replace_purify_desc"
android:icon="@drawable/ic_cfg_replace"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.NameListPreference <io.legado.app.ui.widget.prefs.NameListPreference
@ -18,58 +26,76 @@
android:entryValues="@array/theme_mode_v" android:entryValues="@array/theme_mode_v"
android:key="themeMode" android:key="themeMode"
android:title="@string/theme_mode" android:title="@string/theme_mode"
android:summary="@string/theme_mode_desc"
android:icon="@drawable/ic_cfg_theme"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="isEInkMode" android:key="isEInkMode"
android:title="@string/eink_theme" android:title="@string/eink_theme"
android:summary="@string/eink_theme_desc"
android:icon="@drawable/ic_cfg_e_lnk"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="webService" android:key="webService"
android:title="@string/web_service" android:title="@string/web_service"
android:summary="@string/web_service_desc"
android:icon="@drawable/ic_cfg_web"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/setting" android:title="@string/setting"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false"
app:allowDividerAbove="true"
app:allowDividerBelow="false" >
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="web_dav_setting" android:key="web_dav_setting"
android:summary="@string/web_dav_set_import_old" android:summary="@string/web_dav_set_import_old"
android:title="@string/backup_restore" android:title="@string/backup_restore"
android:icon="@drawable/ic_cfg_backup"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="theme_setting" android:key="theme_setting"
android:summary="@string/theme_setting_s" android:summary="@string/theme_setting_s"
android:title="@string/theme_setting" android:title="@string/theme_setting"
android:icon="@drawable/ic_cfg_theme"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="setting" android:key="setting"
android:summary="@string/other_setting_s" android:summary="@string/other_setting_s"
android:title="@string/other_setting" android:title="@string/other_setting"
android:icon="@drawable/ic_cfg_other"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:key="aboutCategory" android:key="aboutCategory"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:layout="@layout/view_preference_category"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="donate" android:key="donate"
android:summary="您的支持是我更新的动力" android:summary="您的支持是我更新的动力"
android:title="@string/donate" android:title="@string/donate"
android:icon="@drawable/ic_cfg_jz"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference <io.legado.app.ui.widget.prefs.Preference
android:key="about" android:key="about"
android:summary="公众号[开源阅读软件]" android:summary="公众号[开源阅读软件]"
android:title="@string/about" android:title="@string/about"
android:icon="@drawable/ic_cfg_about"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>

Loading…
Cancel
Save