Android 3.0 ActionBar, changing colors

前端 未结 4 535
终归单人心
终归单人心 2020-12-14 11:57

How can I change the color of the underline beneath the tabs? It\'s currently the light blue, and I can\'t find any resources on how to change this for Android 3.0.

4条回答
  •  佛祖请我去吃肉
    2020-12-14 12:20

    As additional info, here's how I found out how to change the blue bar below each tab (the answer above is perfectly good, but I lacked little information that I put here, which might be useful to somebody).

    You just need to change the background to a 9 patch drawable.

    Here's how it looks like:
    http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

    Source available here:
    http://code.google.com/p/styled-action-bar/source/browse/trunk/res/drawable/actionbar_tab_bg.xml

    9 patches available here:
    http://code.google.com/p/styled-action-bar/source/browse/trunk/res/drawable-mdpi

    I know this was really easy, but again, it might be useful so I'm just dropping the links here.

提交回复
热议问题