Is it possible to change the background of a sub screen (PreferenceScreen) of a PreferenceActivity?
I found that you can change the backgro开发者_开发百科und of a PreferenceActivity
by using getListView().setBackgroundResource(R.drawable.bg);
However, if you go to any deeper PreferenceScreens the background returns to being black.
There don't appear to be any methods in PreferenceScreen
that would allow changes to the background either.
The nested PreferenceScreens are supposed to take the theme from the parent however due to this bug http://code.google.com/p/android/issues/detail?id=4611&q=preference%20nested&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars they don't and I don't know of how to set the background manually in the nested preference. Hopefully this helps at least explain why.
Would love to hear if you find a workaround :)
精彩评论