For anyone that ends up on this issue, I found a simple solution with vector drawables for a ~90% of the tab width indicator:
ic_tab_indicator_24dp:
<vector
android:height="24dp"
android:width="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:strokeWidth="4"
android:fillColor="@android:color/white"
android:pathData="M2,0 L22,0 L22,24 L2,24 z"/>
And then set tabIndicator in the layout:
app:tabIndicator="@drawable/ic_tab_indicator_24dp"
Or in styles.xml:
<item name="tabIndicator">@drawable/ic_tab_indicator_24dp</item>
Edit: As my solution is getting attention, I'd add that you can play with the width just modifying the pathData ("M2,0 L22,0 L22,24 L2,24 z") changing 2 and 22 values. The amount added to 2 should be subtracted from 22. i.e.: "M4,0 L20,0 L20,24 L4,24 z" or "M6,0 L18,0 L18,24 L6,24 z"...