I need to show a scrollbar on a horizontally scrolling tab layout.
I have tried the following without success:
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
app:tabMode="scrollable"
android:scrollIndicators="bottom"
android:scrollbarTrackHorizontal="@color/black"
android:scrollbars="horizontal"
android:scrollbarSize="2dp"
android:isScrollContainer="true"
android:scrollbarFadeDuration="0"
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbarStyle="insideOverlay"
android:scrollbarThumbHorizontal="@android:color/darker_gray"
//Not relevant parts below
app:tabSelectedTextColor="@color/blue"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:tabTextAppearance="@style/TabTextAppearance"
android:background="@color/white"
android:visibility="visible"
android:backgroundTint="@color/very_light_gray"
app:tabIndicatorColor="@color/blue"/>