I can read and write shared preferences and have verified that the resulting XML file looks correct. But is it possible to build a hierarchy of preferences instead of just a flat list?
I’m accessing the preferences directly from my code, so the solution must not assume a preferences screen is present in the app. I have found the PreferenceGroup, PreferenceCategory, and PreferenceManager classes, but they seem to assume a preferences screen is present.
No, sorry. From the rest of your question, it’s unclear why you are using
SharedPreferencesin the first place, instead of another persistent data model (database, XML file, JSON file, etc.)