the_prole
the_prole

Reputation: 8985

How to remove Widget.Material3.TabLayout bottom divider

For a style using the Widget.Material3.TabLayout

<style name="MyTabLayout" parent="Widget.Material3.TabLayout">
    <item name="tabTextColor">@color/black</item>
    <item name="tabSelectedTextColor">@color/black</item>
    <item name="tabIndicatorFullWidth">true</item>
</style>

enter image description here

how does one remove the gray bottom divider that is contiguous to the indicator,

enter image description here

such that only the blue indicator is visible?

Upvotes: 3

Views: 348

Answers (1)

Miguel
Miguel

Reputation: 1

This worked for me when applying a background, the white one.

<com.google.android.material.tabs.TabLayout  
   android:id="@+id/status_tab_layout" 
   android:layout_width="match_parent"  
   android:layout_height="wrap_content" 
   app:tabIndicatorColor="@color/transparent" 
   app:tabMode="fixed"    
   app:tabIndicatorFullWidth="false" 
   app:tabIndicatorHeight="0dp"  
   android:background="@color/white"/>

Upvotes: 0

Related Questions