I'm developing an Android app that needs to display a Settings screen with various switches and other stuff.
The problem is this: the App is a multi-platform project and I already have custom code that I use to save and load my preferences in a cross-platform manner, so I will not be relying on Android's SharedPreferences
mechanism.
What I'd like to do is to create a PreferenceActivity
programmatically and populate it with my settings, but have the settings values get loaded/saved by my own custom code.
In other words: I'd like to reuse the nice "list with sections and editing controls" that the PreferenceActivity
provides, but I'd like to populate it dynamically and implement my own code to set/get the preferences values.
I can't find much documentation on this around, does anyone have any clue on where to start?