How to change programmatically background color of action bar items

后端 未结 3 1737
生来不讨喜
生来不讨喜 2021-01-12 06:45

It is easy to set a default color of the items background in action bar by setting:

@drawable/action_bar         


        
3条回答
  •  星月不相逢
    2021-01-12 07:11

    I have found a simple workaround of this problem. You can set transparent color to the background of action bar item. Then changing color of the action bar will change background of the item. I don't see possibility to change item color without recreating an the activity.

提交回复
热议问题