Hi all -- I've been digging around trying to find a solution to my two issues with Preference, but no luck. Maybe someone out there has encountered this.
ISSUE 1 Our designers want a custom header at the top of each preference screen. I've tried setting android:layout but that doesn't work the same for the toplevel PreferenceScreen as it does for child screens. What I really need to do is subclass PreferenceScreen and change the ContentView, but sadly, it's sealed. Basically, I want to have my own UI, with a ListView with id = "@android:id/list" so that the PreferenceScreen can find where to put its items. I looked through the source code to see whether I could simply override the style for PreferenceScreen, but it appears they use com.android.internal.R.attr.preferenceScreenStyle when creating the PreferenceScreen. Can I somehow override that? If so, that might be the way to go. Does anyone have any other ideas? ISSUE 2 In our app, we have the ability to "sign in" with your "ID". We have the requirement that preferences for each separate ID be stored indpendently in our database. I'd like to continue to use the built- in preference mechanisms. I was thinking that I might be able to simply override getSharedPreferences() on the Context that invokes the preference screen (probably the Application subclass) and return a custom SharedPreferences class instance. In my custom instance, I would simply read and write to the database based on the given user's ID rather than allowing the base SharedPreferences class to store the settings itself. Is this the correct approach? Are there other solutions that have worked for anyone? Thanks!! -E -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.