I want to implement a Tab Indicator with bottom margin
<com.google.android.material.tabs.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabIndicator="@drawable/sui_tab_indicator" app:tabIndicatorColor="@color/black" app:tabIndicatorGravity="bottom" app:tabIndicatorFullWidth="false" app:tabIndicatorHeight="2dp" app:tabMode="scrollable" />
Used this TabItem with indicator drawable
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:end="6dp" android:start="6dp"> <shape android:shape="rectangle"> <corners android:radius="5dp" /> <solid android:color="@color/black" /> </shape> </item> </layer-list>