I am working with TabLayout
I need to set the color of TabIndicator when its not selected.
This is what i need to do -

This is what i have done -

Use app:tabTextColorfor this .
When Unselected it will show app:tabTextColor
When Selected it will show app:tabSelectedTextColor
Use below code :
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
app:tabGravity="fill"
app:tabMode="fixed"
android:background="@color/colorPrimary"
app:tabIndicatorColor="@color/white"
app:tabIndicatorHeight="4dp"
app:tabSelectedTextColor="@color/white"
app:tabTextColor="#AAAAAA"
app:tabTextAppearance="@style/NavigationTabTextAppeareance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp"
>
styles.xml : for bold Tabtext
<style name="NavigationTabTextAppeareance" parent="TextAppearance.Design.Tab">
<item name="android:textStyle">bold</item>
</style>
For Unselected Tab bottom color :
Reference: TabLayout color of unselected tab underline
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With