pull/34/head
kunfei 5 years ago
parent c0b6fd8eed
commit bff3e15e1c
  1. 5
      app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt
  2. 14
      app/src/main/java/io/legado/app/ui/config/WebDavConfigFragment.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)

@ -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<EditTextPreference>("web_dav_url")?.let {
it.setOnBindEditTextListener { editText ->
ATH.setTint(editText, requireContext().accentColor)
}
bindPreferenceSummaryToValue(it)
}
findPreference<EditTextPreference>("web_dav_account")?.let {
it.setOnBindEditTextListener { editText ->
ATH.setTint(editText, requireContext().accentColor)
}
bindPreferenceSummaryToValue(it)
}
findPreference<EditTextPreference>("web_dav_password")?.let {
it.setOnBindEditTextListener { editText ->
ATH.setTint(editText, requireContext().accentColor)

Loading…
Cancel
Save