ActionBar background image

后端 未结 5 1187
旧巷少年郎
旧巷少年郎 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:02

    Drawable d=getResources().getDrawable(R.drawable.background_image_name);  
    getActionBar().setBackgroundDrawable(d);
    

    The above code sets the background image for the action bar.
    Hope it helps.

提交回复
热议问题