Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actionbar tab selection divider color

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

like image 200
Dion Segijn Avatar asked Nov 03 '22 15:11

Dion Segijn


1 Answers

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

like image 196
Jinu Avatar answered Nov 11 '22 06:11

Jinu