From 7696e36286bdec6d978c5783033c1b3397001a8c Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 24 Jan 2020 19:47:20 +0800 Subject: [PATCH] up --- .../app/lib/theme/prefs/ATEListPreference.kt | 22 +++++++++++++++++++ app/src/main/res/values/arrays.xml | 4 ++-- app/src/main/res/xml/pref_config_read.xml | 8 +++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/io/legado/app/lib/theme/prefs/ATEListPreference.kt diff --git a/app/src/main/java/io/legado/app/lib/theme/prefs/ATEListPreference.kt b/app/src/main/java/io/legado/app/lib/theme/prefs/ATEListPreference.kt new file mode 100644 index 000000000..3e81a1d1c --- /dev/null +++ b/app/src/main/java/io/legado/app/lib/theme/prefs/ATEListPreference.kt @@ -0,0 +1,22 @@ +package io.legado.app.lib.theme.prefs + +import android.content.Context +import android.util.AttributeSet +import android.widget.TextView +import androidx.preference.ListPreference +import androidx.preference.PreferenceViewHolder +import io.legado.app.R + + +class ATEListPreference(context: Context, attrs: AttributeSet) : ListPreference(context, attrs) { + + init { + widgetLayoutResource = R.layout.item_text + } + + override fun onBindViewHolder(holder: PreferenceViewHolder?) { + super.onBindViewHolder(holder) + val textView = holder?.itemView?.findViewById(R.id.text_view) + textView?.text = entry + } +} \ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 7534dcab1..67bb70836 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -78,13 +78,13 @@ 常亮 - + 0 60 120 180 -1 - + @string/screen_unspecified diff --git a/app/src/main/res/xml/pref_config_read.xml b/app/src/main/res/xml/pref_config_read.xml index b24a16a71..2ab931c64 100644 --- a/app/src/main/res/xml/pref_config_read.xml +++ b/app/src/main/res/xml/pref_config_read.xml @@ -2,6 +2,14 @@ + +