settings: improve preference management

Rework the preference classes to reduce the horrible bloat of the
recursivelyHandlePreference function.

This was mostly implementing new methods into IntListPreference and
adding a new preference to represent the weird, "generic" dialogs that
are used at points. While some preferences still need to be tweaked in
recursivelyHandlePreference, it is nowhere near as bad as it was prior.
This commit is contained in:
OxygenCobalt
2022-06-20 11:12:55 -06:00
parent 532a30325a
commit bd92ba2175
13 changed files with 204 additions and 133 deletions
+2
View File
@@ -8,5 +8,7 @@
<declare-styleable name="IntListPreference">
<attr name="entries" format="reference" />
<attr name="entryValues" format="reference" />
<attr name="entryIcons" format="reference" />
<attr name="offValue" format="reference" />
</declare-styleable>
</resources>
+6
View File
@@ -44,6 +44,12 @@
<item>@string/set_theme_night</item>
</string-array>
<array name="icons_theme">
<item>@drawable/ic_auto</item>
<item>@drawable/ic_light</item>
<item>@drawable/ic_dark</item>
</array>
<integer-array name="values_theme">
<item>@integer/theme_auto</item>
<item>@integer/theme_light</item>