5

In the picture below from the developers guide of android you see the light blue edge underneath the tabs. I tried to style this small edge with an other color but i had no success.

Meanwhile i succeed to style the action bar, and tabs. But the only thing i can't get succeed on is changing that little blue edge. I even don't know how its called in the guide. Because the divider is the little stripe between all the taps:

[ BALLOONS | BIKES | ANDROIDS | PASTRIES ]

Can someone help me with this? Which style i have to use to change this color?

The follow line didn't work out:

<item name="android:actionBarDivider">@drawable/divider</item>

enter image description here

4

2 回答 2

2

如果您想使用操作栏选项卡,请使用 pagerslidingtabstrip 库制作选项卡,那么这里是代码

<item name="android:actionBarTabBarStyle">@style/customTabBar</item> 

操作栏选项卡指示器中的分隔符代码

<style name="customTabBar" parent="@style/Widget.AppCompat.ActionBar.TabBar">
<item name="android:showDividers">middle</item>
<!-- give your divider here -->
<item name="android:divider">@drawable/tabindicator</item>
<item name="android:dividerPadding">0dp</item>

其中@drawble/tabindicator 是drawble 中的图片

于 2014-10-06T09:07:10.453 回答
0

它被称为标签发线样式。您可以使用此工具生成并可能弄清楚如何更改颜色:http: //jgilfelt.github.io/android-actionbarstylegenerator/

于 2014-07-24T14:58:43.403 回答