ActionBar background image

后端 未结 5 1222
旧巷少年郎
旧巷少年郎 2020-11-29 20:41

I\'ve inherited the Holo Light Theme and customized the background of the ActionBar with the following:

Content of styles.xml



        
5条回答
  •  生来不讨喜
    2020-11-29 21:15

    You can easily do this thing. If you would like to change Action Bar background image then you place this code to your res/styles.xml file.

     
    
        
    

    For this you have to select an image from "drawable" folder . Here I select an image "tp_black_bg.png"

    After that don't forget to declare this theme to your AndroidManifest.xml file

        .............
    

    Now you can reopen any XML layout file , you can easily see the effect. In the same way you can also able to change the background color of ActionBar.

    Thanks.

提交回复
热议问题