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

Dion Segijn
  • 2,625
  • 4
  • 24
  • 41

2 Answers2

2

Use pagerslidingtabstrip library for making tabs if youy want to use actionbar tabs then here is the code

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

code for devider in action bar tab indicator

<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>

where @drawble/tabindicator is a picture in drawble

Jinu
  • 8,665
  • 4
  • 32
  • 37
0

It's called Tab HairLine Style. You can use this tool to generate and probably figure out how to change the color : http://jgilfelt.github.io/android-actionbarstylegenerator/

Jessicardo
  • 826
  • 1
  • 8
  • 12