|
|
@ -25,7 +25,6 @@ import io.legado.app.lib.dialogs.alert |
|
|
|
import io.legado.app.lib.permission.Permissions |
|
|
|
import io.legado.app.lib.permission.Permissions |
|
|
|
import io.legado.app.lib.permission.PermissionsCompat |
|
|
|
import io.legado.app.lib.permission.PermissionsCompat |
|
|
|
import io.legado.app.lib.prefs.fragment.PreferenceFragment |
|
|
|
import io.legado.app.lib.prefs.fragment.PreferenceFragment |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
|
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.ui.document.HandleFileContract |
|
|
|
import io.legado.app.ui.document.HandleFileContract |
|
|
|
import io.legado.app.ui.widget.dialog.TextDialog |
|
|
|
import io.legado.app.ui.widget.dialog.TextDialog |
|
|
@ -100,28 +99,12 @@ class BackupConfigFragment : PreferenceFragment(), |
|
|
|
|
|
|
|
|
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { |
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { |
|
|
|
addPreferencesFromResource(R.xml.pref_config_backup) |
|
|
|
addPreferencesFromResource(R.xml.pref_config_backup) |
|
|
|
findPreference<EditTextPreference>(PreferKey.webDavUrl)?.let { |
|
|
|
|
|
|
|
it.setOnBindEditTextListener { editText -> |
|
|
|
|
|
|
|
editText.applyTint(requireContext().accentColor) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
findPreference<EditTextPreference>(PreferKey.webDavAccount)?.let { |
|
|
|
|
|
|
|
it.setOnBindEditTextListener { editText -> |
|
|
|
|
|
|
|
editText.applyTint(requireContext().accentColor) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
findPreference<EditTextPreference>(PreferKey.webDavPassword)?.let { |
|
|
|
findPreference<EditTextPreference>(PreferKey.webDavPassword)?.let { |
|
|
|
it.setOnBindEditTextListener { editText -> |
|
|
|
it.setOnBindEditTextListener { editText -> |
|
|
|
editText.applyTint(requireContext().accentColor) |
|
|
|
|
|
|
|
editText.inputType = |
|
|
|
editText.inputType = |
|
|
|
InputType.TYPE_TEXT_VARIATION_PASSWORD or InputType.TYPE_CLASS_TEXT |
|
|
|
InputType.TYPE_TEXT_VARIATION_PASSWORD or InputType.TYPE_CLASS_TEXT |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
findPreference<EditTextPreference>(PreferKey.webDavDir)?.let { |
|
|
|
|
|
|
|
it.setOnBindEditTextListener { editText -> |
|
|
|
|
|
|
|
editText.applyTint(requireContext().accentColor) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
upPreferenceSummary(PreferKey.webDavUrl, getPrefString(PreferKey.webDavUrl)) |
|
|
|
upPreferenceSummary(PreferKey.webDavUrl, getPrefString(PreferKey.webDavUrl)) |
|
|
|
upPreferenceSummary(PreferKey.webDavAccount, getPrefString(PreferKey.webDavAccount)) |
|
|
|
upPreferenceSummary(PreferKey.webDavAccount, getPrefString(PreferKey.webDavAccount)) |
|
|
|
upPreferenceSummary(PreferKey.webDavPassword, getPrefString(PreferKey.webDavPassword)) |
|
|
|
upPreferenceSummary(PreferKey.webDavPassword, getPrefString(PreferKey.webDavPassword)) |
|
|
|