1
0
Fork 0
mirror of https://github.com/Corewala/Buran synced 2024-12-22 07:42:43 +00:00

Renamed themes category

This commit is contained in:
Corewala 2021-12-08 15:42:41 -05:00
parent 5910257488
commit 2aa9c5c271
3 changed files with 11 additions and 9 deletions

View file

@ -68,8 +68,8 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
//Home - Certificates
buildClientCertificateSection(context, appCategory)
//Theme --------------------------------------------
buildThemeSection(context, appCategory)
//Appearance --------------------------------------------
buildAppearanceSection(context, appCategory)
//Accessibility ------------------------------------
buildsAccessibility(context, screen)
@ -98,11 +98,11 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
}
private fun buildThemeSection(context: Context?, appCategory: PreferenceCategory) {
val themeCategory = PreferenceCategory(context)
themeCategory.key = "theme_category"
themeCategory.title = getString(R.string.theme)
appCategory.addPreference(themeCategory)
private fun buildAppearanceSection(context: Context?, appCategory: PreferenceCategory) {
val appearanceCategory = PreferenceCategory(context)
appearanceCategory.key = "appearance_category"
appearanceCategory.title = getString(R.string.appearance)
appCategory.addPreference(appearanceCategory)
val themeLabels = mutableListOf<String>()
val themeValues = mutableListOf<String>()
@ -121,7 +121,7 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
themePreference.setDefaultValue("theme_FollowSystem")
themePreference.entries = themeLabels.toTypedArray()
themePreference.entryValues = themeValues.toTypedArray()
themeCategory.addPreference(themePreference)
appearanceCategory.addPreference(themePreference)
themePreference.setOnPreferenceChangeListener{ _, theme ->
when (theme) {
@ -162,7 +162,7 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
true
}
themeCategory.addPreference(backgroundColourPreference)
appearanceCategory.addPreference(backgroundColourPreference)
}
private fun buildsAccessibility(context: Context?, screen: PreferenceScreen){

View file

@ -45,6 +45,7 @@
<string name="configure_buran">Configurer Buran</string>
<string name="home_capsule">Capsule d\'accueil</string>
<string name="update">Mettre à jour</string>
<string name="appearance">Apparence</string>
<string name="theme">Thème</string>
<string name="prefs_override_theme">Choisir un thème</string>
<string name="system_default">Paramètre système</string>

View file

@ -45,6 +45,7 @@
<string name="configure_buran">Configure Buran</string>
<string name="home_capsule">Home Capsule</string>
<string name="update">Update</string>
<string name="appearance">Appearance</string>
<string name="theme">Theme</string>
<string name="prefs_override_theme">Select a theme</string>
<string name="system_default">System Default</string>