Add a different color for each action bar tabs separately

后端 未结 2 1669
南笙
南笙 2021-01-29 00:06

I need to add a different color for every tabs.

For Eg: like this below image

\"enter

2条回答
  •  清酒与你
    2021-01-29 00:54

    You cannot set a different background color on the action bar tabs as they take the color from the action bar itself and thus, they can all be the same color - one color, as the action bar.

    If you want to get each tab a different color then you will have to write custom views (Button widgets in a horizontal LinearLayout with view pager) to simulate the behavior of tabs.

提交回复
热议问题