From bff3e15e1c587d60c76e8f30c26c0c344b7d9a97 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Sep 2019 17:06:21 +0800 Subject: [PATCH] up --- .../app/lib/theme/prefs/ATEPreferenceCategory.kt | 5 ++--- .../legado/app/ui/config/WebDavConfigFragment.kt | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt b/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt index ba4363b15..16f9e168f 100644 --- a/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt +++ b/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt @@ -8,9 +8,8 @@ import androidx.preference.PreferenceViewHolder import io.legado.app.lib.theme.ThemeStore -class ATEPreferenceCategory : PreferenceCategory { - - constructor(context: Context, attrs: AttributeSet) : super(context, attrs) +class ATEPreferenceCategory(context: Context, attrs: AttributeSet) : + PreferenceCategory(context, attrs) { override fun onBindViewHolder(holder: PreferenceViewHolder?) { super.onBindViewHolder(holder) diff --git a/app/src/main/java/io/legado/app/ui/config/WebDavConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/WebDavConfigFragment.kt index ed55aedfd..52837150d 100644 --- a/app/src/main/java/io/legado/app/ui/config/WebDavConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/WebDavConfigFragment.kt @@ -18,8 +18,18 @@ class WebDavConfigFragment : PreferenceFragmentCompat(), Preference.OnPreference override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { addPreferencesFromResource(R.xml.pref_config_web_dav) - bindPreferenceSummaryToValue(findPreference("web_dav_url")) - bindPreferenceSummaryToValue(findPreference("web_dav_account")) + findPreference("web_dav_url")?.let { + it.setOnBindEditTextListener { editText -> + ATH.setTint(editText, requireContext().accentColor) + } + bindPreferenceSummaryToValue(it) + } + findPreference("web_dav_account")?.let { + it.setOnBindEditTextListener { editText -> + ATH.setTint(editText, requireContext().accentColor) + } + bindPreferenceSummaryToValue(it) + } findPreference("web_dav_password")?.let { it.setOnBindEditTextListener { editText -> ATH.setTint(editText, requireContext().accentColor)