-1

By Default, the View Pager(Swipe Tabs) Tab title color is White but i want to change into orange. Can any one help me please or share if you have any tutorial.

Thanks...

Narasimha Rao
  • 37
  • 1
  • 4

1 Answers1

1

Use this style in your styles.xml and assign the style to your tab layout.

<style name="MyMaterialTheme.TabLayout" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">@android:color/white</item>
<item name="tabIndicatorHeight">3dp</item>
<item name="tabTextAppearance">@style/MyMaterialTheme.TabLayout.TextAppearance</item>
<item name="tabSelectedTextColor">@android:color/white</item>
<item name="android:background">@color/colorPrimary</item>
</style>

<style name="MyMaterialTheme.TabLayout.TextAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textSize">14sp</item>
<item name="android:textColor">@color/tab_text_inactive</item>
<item name="textAllCaps">true</item>
</style>

Check implementation from here.

Imdad
  • 683
  • 1
  • 9
  • 27