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)