Custom (gradient) background of ActionBar Compat

后端 未结 4 1584
遥遥无期
遥遥无期 2021-02-05 13:59

I am using Action Bar Compat so that my action bar with navigation drawer was backward compatible down to API level 9 and I want to change the background of the action bar.

4条回答
  •  太阳男子
    2021-02-05 14:52

    This is an example for the action bar xml:

    
     
        
     
    

    Instead of using android:shape="line" , in order to avoid DeadObjectException , you can set the android:angle to 180 or 0 - the effect will be the same, that is a horizontal line gradient.

提交回复
热议问题