How do you change TabPageIndicator's color in standard style?
-
I'll use it.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
minSdkVersion 16 targetSdkVersion 22
That's a way to change the thickness of the Indicator and its color. How do you do that with style?
For now, I'm in style.
<resources>
<!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="actionBarStyle">@style/MyActionBar</item> <item name="actionBarTabBarStyle">@style/ActionBarTabStyle</item> </style> <style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar"> <item name="background">@color/BackgroundColorActionBar</item> <item name="android:titleTextStyle">@style/MyTitleTextStyle</item> </style> <style name="MyTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"> <item name="android:textColor">@color/White</item> </style> <style name="ActionBarTabStyle" parent="@style/Widget.AppCompat.ActionBar.TabView"> <item name="android:background">@color/BackgroundColorTabActionBar</item> </style>
</resources>
Here's thelips.
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.0'
-
You can try to create one.
style
:<style name="MyTabWidgetStyle" parent="Base.Widget.Design.TabLayout"> <item name="tabIndicatorColor">@color/targetColor</item> <item name="tabIndicatorHeight">1dp</item> </style>
and stick it in.
TabLayout
<android.support.design.widget.TabLayout ... style="@style/MyTabWidgetStyle" />