feat: 优化代码

pull/103/head
kunfei 5 years ago
parent 55a8c594ef
commit 397317840d
  1. 4
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
  2. 10
      app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt
  3. 4
      app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt
  4. 8
      app/src/main/java/io/legado/app/ui/widget/text/EditText.kt
  5. 8
      app/src/main/res/layout/activity_book_info_edit.xml
  6. 4
      app/src/main/res/layout/dialog_page_key.xml
  7. 10
      app/src/main/res/layout/dialog_replace_edit.xml
  8. 2
      app/src/main/res/layout/item_source_edit.xml
  9. 8
      app/src/main/res/xml/about.xml
  10. 12
      app/src/main/res/xml/donate.xml
  11. 8
      app/src/main/res/xml/pref_config_aloud.xml
  12. 8
      app/src/main/res/xml/pref_config_backup.xml
  13. 18
      app/src/main/res/xml/pref_config_other.xml
  14. 12
      app/src/main/res/xml/pref_config_read.xml
  15. 12
      app/src/main/res/xml/pref_config_theme.xml
  16. 12
      app/src/main/res/xml/pref_main.xml

@ -14,7 +14,6 @@ import io.legado.app.base.BaseFragment
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.prefs.ATESwitchPreference
import io.legado.app.service.WebService import io.legado.app.service.WebService
import io.legado.app.ui.about.AboutActivity import io.legado.app.ui.about.AboutActivity
import io.legado.app.ui.about.DonateActivity import io.legado.app.ui.about.DonateActivity
@ -24,6 +23,7 @@ import io.legado.app.ui.config.ConfigActivity
import io.legado.app.ui.config.ConfigViewModel import io.legado.app.ui.config.ConfigViewModel
import io.legado.app.ui.filechooser.FileChooserDialog import io.legado.app.ui.filechooser.FileChooserDialog
import io.legado.app.ui.replacerule.ReplaceRuleActivity import io.legado.app.ui.replacerule.ReplaceRuleActivity
import io.legado.app.ui.widget.prefs.SwitchPreference
import io.legado.app.utils.* import io.legado.app.utils.*
import kotlinx.android.synthetic.main.view_title_bar.* import kotlinx.android.synthetic.main.view_title_bar.*
import org.jetbrains.anko.startActivity import org.jetbrains.anko.startActivity
@ -70,7 +70,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog.
putPrefBoolean(PreferKey.webService, false) putPrefBoolean(PreferKey.webService, false)
} }
addPreferencesFromResource(R.xml.pref_main) addPreferencesFromResource(R.xml.pref_main)
val webServicePre = findPreference<ATESwitchPreference>(PreferKey.webService) val webServicePre = findPreference<SwitchPreference>(PreferKey.webService)
observeEvent<Boolean>(EventBus.WEB_SERVICE_STOP) { observeEvent<Boolean>(EventBus.WEB_SERVICE_STOP) {
webServicePre?.isChecked = false webServicePre?.isChecked = false
} }

@ -1,4 +1,4 @@
package io.legado.app.lib.theme.prefs package io.legado.app.ui.widget.prefs
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
@ -8,17 +8,15 @@ import androidx.preference.PreferenceViewHolder
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
class ATEPreferenceCategory(context: Context, attrs: AttributeSet) : class PreferenceCategory(context: Context, attrs: AttributeSet) :
PreferenceCategory(context, attrs) { PreferenceCategory(context, attrs) {
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(android.R.id.title)
if (!view.isInEditMode) { if (view is TextView && !view.isInEditMode) {
if (view is TextView) { view.setTextColor(context.accentColor)//设置title文本的颜色
view.setTextColor(context.accentColor)//设置title文本的颜色
}
} }
} }
} }

@ -1,4 +1,4 @@
package io.legado.app.lib.theme.prefs package io.legado.app.ui.widget.prefs
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
@ -9,7 +9,7 @@ import io.legado.app.R
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
class ATESwitchPreference(context: Context, attrs: AttributeSet) : class SwitchPreference(context: Context, attrs: AttributeSet) :
SwitchPreferenceCompat(context, attrs) { SwitchPreferenceCompat(context, attrs) {
override fun onBindViewHolder(holder: PreferenceViewHolder?) { override fun onBindViewHolder(holder: PreferenceViewHolder?) {

@ -1,4 +1,4 @@
package io.legado.app.lib.theme.view package io.legado.app.ui.widget.text
import android.content.Context import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
@ -9,9 +9,11 @@ import io.legado.app.lib.theme.ThemeStore
/** /**
* @author Aidan Follestad (afollestad) * @author Aidan Follestad (afollestad)
*/ */
class ATEEditText(context: Context, attrs: AttributeSet) : AppCompatEditText(context, attrs) { class EditText(context: Context, attrs: AttributeSet) : AppCompatEditText(context, attrs) {
init { init {
ATH.setTint(this, ThemeStore.accentColor(context)) if (!isInEditMode) {
ATH.setTint(this, ThemeStore.accentColor(context))
}
} }
} }

@ -48,7 +48,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/book_name"> android:hint="@string/book_name">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/tie_book_name" android:id="@+id/tie_book_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -61,7 +61,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/author"> android:hint="@string/author">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/tie_book_author" android:id="@+id/tie_book_author"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -78,7 +78,7 @@
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:hint="@string/cover_path"> android:hint="@string/cover_path">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/tie_cover_url" android:id="@+id/tie_cover_url"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -125,7 +125,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:hint="@string/book_intro"> android:hint="@string/book_intro">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/tie_book_intro" android:id="@+id/tie_book_intro"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

@ -21,7 +21,7 @@
android:layout_margin="5dp" android:layout_margin="5dp"
android:hint="@string/prev_page_key"> android:hint="@string/prev_page_key">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_prev" android:id="@+id/et_prev"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -36,7 +36,7 @@
android:layout_margin="5dp" android:layout_margin="5dp"
android:hint="@string/next_page_key"> android:hint="@string/next_page_key">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_next" android:id="@+id/et_next"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

@ -30,7 +30,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/replace_rule_summary"> android:hint="@string/replace_rule_summary">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_name" android:id="@+id/et_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -42,7 +42,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/group"> android:hint="@string/group">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_group" android:id="@+id/et_group"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -54,7 +54,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/replace_rule"> android:hint="@string/replace_rule">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_replace_rule" android:id="@+id/et_replace_rule"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -72,7 +72,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/replace_to"> android:hint="@string/replace_to">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_replace_to" android:id="@+id/et_replace_to"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@ -84,7 +84,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/use_to"> android:hint="@string/use_to">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/et_scope" android:id="@+id/et_scope"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

@ -5,7 +5,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="3dp"> android:paddingTop="3dp">
<io.legado.app.lib.theme.view.ATEEditText <io.legado.app.ui.widget.text.EditText
android:id="@+id/editText" android:id="@+id/editText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />

@ -18,7 +18,7 @@
android:title="@string/update_log" android:title="@string/update_log"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="联系我们" android:title="联系我们"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -52,9 +52,9 @@
android:summary="@string/home_page_url" android:summary="@string/home_page_url"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="其它" android:title="其它"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -68,6 +68,6 @@
android:title="@string/disclaimer" android:title="@string/disclaimer"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -2,7 +2,7 @@
<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">
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="微信" android:title="微信"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -18,9 +18,9 @@
android:summary="点击打开" android:summary="点击打开"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="支付宝" android:title="支付宝"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -48,9 +48,9 @@
android:summary="点击打开" android:summary="点击打开"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="QQ" android:title="QQ"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -60,6 +60,6 @@
android:summary="点击打开" android:summary="点击打开"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -2,17 +2,17 @@
<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">
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/aloud_config" android:title="@string/aloud_config"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/read_aloud_by_page" android:title="@string/read_aloud_by_page"
android:key="readAloudByPage" android:key="readAloudByPage"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/read_aloud_on_line" android:title="@string/read_aloud_on_line"
android:key="readAloudOnLine" android:key="readAloudOnLine"
@ -26,6 +26,6 @@
android:entryValues="@array/tts_speech_per_value" android:entryValues="@array/tts_speech_per_value"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -2,7 +2,7 @@
<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">
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/web_dav_set" android:title="@string/web_dav_set"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -24,9 +24,9 @@
android:summary="@string/web_dav_pw_s" android:summary="@string/web_dav_pw_s"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory app:iconSpaceReserved="false"> <io.legado.app.ui.widget.prefs.PreferenceCategory app:iconSpaceReserved="false">
<androidx.preference.Preference <androidx.preference.Preference
android:key="backupUri" android:key="backupUri"
@ -48,6 +48,6 @@
android:title="导入旧版本数据" android:title="导入旧版本数据"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -2,33 +2,33 @@
<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">
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/main_activity" android:title="@string/main_activity"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pk_auto_refresh" android:key="@string/pk_auto_refresh"
android:summary="@string/ps_auto_refresh" android:summary="@string/ps_auto_refresh"
android:title="@string/pt_auto_refresh" android:title="@string/pt_auto_refresh"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pk_default_read" android:key="@string/pk_default_read"
android:summary="@string/ps_default_read" android:summary="@string/ps_default_read"
android:title="@string/pt_default_read" android:title="@string/pt_default_read"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="showRss" android:key="showRss"
android:title="@string/show_rss" android:title="@string/show_rss"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/other_setting" android:title="@string/other_setting"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -47,20 +47,20 @@
android:title="@string/cleanCache" android:title="@string/cleanCache"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="process_text" android:key="process_text"
android:summary="@string/add_to_text_context_menu_s" android:summary="@string/add_to_text_context_menu_s"
android:title="@string/add_to_text_context_menu_t" android:title="@string/add_to_text_context_menu_t"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="recordLog" android:key="recordLog"
android:title="@string/record_log" android:title="@string/record_log"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -10,37 +10,37 @@
android:title="@string/keep_light" android:title="@string/keep_light"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/pt_hide_status_bar" android:title="@string/pt_hide_status_bar"
android:key="hideStatusBar" android:key="hideStatusBar"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/pt_hide_navigation_bar" android:title="@string/pt_hide_navigation_bar"
android:key="hideNavigationBar" android:key="hideNavigationBar"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:title="@string/volume_key_page" android:title="@string/volume_key_page"
android:key="volumeKeyPage" android:key="volumeKeyPage"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/click_all_next_page" android:title="@string/click_all_next_page"
android:key="clickAllNext" android:key="clickAllNext"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/volume_key_page_on_play" android:title="@string/volume_key_page_on_play"
android:key="volumeKeyPageOnPlay" android:key="volumeKeyPageOnPlay"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:title="@string/selectText" android:title="@string/selectText"
android:key="selectText" android:key="selectText"

@ -12,14 +12,14 @@
app:icons="@array/icons" app:icons="@array/icons"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="transparentStatusBar" android:key="transparentStatusBar"
android:summary="@string/status_bar_immersion" android:summary="@string/status_bar_immersion"
android:title="@string/immersion_status_bar" android:title="@string/immersion_status_bar"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="navigationBarColorChange" android:key="navigationBarColorChange"
android:summary="@string/navigation_bar_color_change_s" android:summary="@string/navigation_bar_color_change_s"
@ -32,7 +32,7 @@
android:title="@string/default_theme" android:title="@string/default_theme"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="白天" android:title="白天"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -60,9 +60,9 @@
app:cpv_dialogType="preset" app:cpv_dialogType="preset"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="夜间" android:title="夜间"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -90,6 +90,6 @@
app:cpv_dialogType="preset" app:cpv_dialogType="preset"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

@ -20,19 +20,19 @@
android:title="@string/theme_mode" android:title="@string/theme_mode"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <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"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <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"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/setting" android:title="@string/setting"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
@ -54,9 +54,9 @@
android:title="@string/other_setting" android:title="@string/other_setting"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory app:iconSpaceReserved="false"> <io.legado.app.ui.widget.prefs.PreferenceCategory app:iconSpaceReserved="false">
<androidx.preference.Preference <androidx.preference.Preference
android:key="donate" android:key="donate"
@ -70,6 +70,6 @@
android:title="@string/about" android:title="@string/about"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
</io.legado.app.lib.theme.prefs.ATEPreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>
Loading…
Cancel
Save