ListPreference: Use array.xml resource?
Is there a easy way to load value / label pairs from arrays.xml?
can you maybe add it to the example?
in the old XML preferences you had two parameters: app:entries="@array/setting_entries" app:entryValues="@array/setting_values"
now i need to create some kind of object that will return its value and offer a toString() to write the "entries"?
You can create a helper for loading the resources, and then do a reverse lookup for finding the index of the value and then get the entry name from the index. I didn't create such a helper because I'd like to make the library Compose Multi-Platform one day so I wanted to avoid an API specific to Android. Plus it's relatively straightforward to write.