I'm working on an Android TV project which is using Leanback lib.
What I'm trying to achieve is make visible the vertical scrollbar which comes inbuilt in VerticalGridView (androidx.leanback.widget.VerticalGridView
).
<androidx.leanback.widget.VerticalGridView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fadeScrollbars="false"
android:scrollbarThumbVertical="@color/color_green"
app:fastScrollVerticalThumbDrawable="@drawable/scrollbar_vertical_thumb"
android:scrollbarSize="5dp"
style="?attr/rowsVerticalGridStyle" />
As it shows, I've tried setting Scrollbar size, drawable, thumb style, and every other possible property to make visible the scrollbar.
Now the tragedy is, when i call verticalGridView.getVerticalScrollbarWidth();
method to check the width, it returns 0
. it seems that Leanback lib is setting VerticalScrollbarWidth to 0
in some place which I can't find.
I also tried looking in other Leanback apps and no apps show scrollbar thumbs though the view is scrollable.
WHY?? Is there any way I can show my users, the scrollbar on Android TV app?