mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 16:59:55 +00:00
Add: Personalization preference category (replacing language & themes)
This commit is contained in:
parent
ab10765eaf
commit
05c0e28ce5
@ -70,12 +70,27 @@ class SettingsFragment : ScreenFragment() {
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
|
||||
preferences.addCategory(requireContext().getString(R.string.prefs_language_title)) {
|
||||
preferences.addCategory(requireContext().getString(R.string.prefs_personalization)) {
|
||||
addList(
|
||||
Preferences.Key.Language,
|
||||
context.getString(R.string.prefs_language_title),
|
||||
languagesList
|
||||
) { translateLocale(context.getLocaleOfCode(it)) }
|
||||
addEnumeration(Preferences.Key.Theme, getString(R.string.theme)) {
|
||||
when (it) {
|
||||
is Preferences.Theme.System -> getString(R.string.system)
|
||||
is Preferences.Theme.AmoledSystem -> getString(R.string.system) + " " + getString(
|
||||
R.string.amoled
|
||||
)
|
||||
is Preferences.Theme.Light -> getString(R.string.light)
|
||||
is Preferences.Theme.Dark -> getString(R.string.dark)
|
||||
is Preferences.Theme.Amoled -> getString(R.string.amoled)
|
||||
}
|
||||
}
|
||||
addSwitch(
|
||||
Preferences.Key.ListAnimation, getString(R.string.list_animation),
|
||||
getString(R.string.list_animation_description)
|
||||
)
|
||||
}
|
||||
preferences.addCategory(getString(R.string.updates)) {
|
||||
addEnumeration(
|
||||
@ -112,23 +127,6 @@ class SettingsFragment : ScreenFragment() {
|
||||
addEditString(Preferences.Key.ProxyHost, getString(R.string.proxy_host))
|
||||
addEditInt(Preferences.Key.ProxyPort, getString(R.string.proxy_port), 1..65535)
|
||||
}
|
||||
preferences.addCategory(getString(R.string.themes)) {
|
||||
addEnumeration(Preferences.Key.Theme, getString(R.string.theme)) {
|
||||
when (it) {
|
||||
is Preferences.Theme.System -> getString(R.string.system)
|
||||
is Preferences.Theme.AmoledSystem -> getString(R.string.system) + " " + getString(
|
||||
R.string.amoled
|
||||
)
|
||||
is Preferences.Theme.Light -> getString(R.string.light)
|
||||
is Preferences.Theme.Dark -> getString(R.string.dark)
|
||||
is Preferences.Theme.Amoled -> getString(R.string.amoled)
|
||||
}
|
||||
}
|
||||
addSwitch(
|
||||
Preferences.Key.ListAnimation, getString(R.string.list_animation),
|
||||
getString(R.string.list_animation_description)
|
||||
)
|
||||
}
|
||||
preferences.addCategory(getString(R.string.install_types)) {
|
||||
addSwitch(
|
||||
Preferences.Key.RootPermission, getString(R.string.root_permission),
|
||||
|
@ -174,4 +174,5 @@
|
||||
<string name="whats_new">What\'s New</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="prefs_language_title">Langugage</string>
|
||||
<string name="prefs_personalization">Personalization</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user