change background color of Preference

后端 未结 8 1807
北荒
北荒 2020-12-02 10:25

I have a PreferenceCategory, xml file and I have defined all preferences in it, I call this from class that extends PreferenceActivity. I am unable

8条回答
  •  执念已碎
    2020-12-02 11:11

    You can define a theme and then set this for your PreferenceActivity in the manifest. Your theme can then define a a background color or a windowBackground image should you prefer that.

    Manifest:

        
                                            
            
        
    

    Then add the theme to your styles.xml

    
    

    In the above snippet there's both a background color and a background image defined to show how to do it.

提交回复
热议问题