0
votes

When I scroll the list, fastscroll thumb is showed but the scrollbar thumb and track not showed.

Here is my XML code:

<ListView
        android:id="@+id/list_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbarTrackVertical="@drawable/bg_scroll"
        android:scrollbarThumbVertical="@drawable/scroll_bar"
        android:divider="@drawable/list_line"
        android:fastScrollEnabled="true"`/>

My fastscroll thumb drawable is setted in styles.xml AppTheme.

2

2 Answers

0
votes

Since you have set android:fastScrollEnabled="true" you need to set the fastScroll properties like android:fastScrollTrackDrawable="@drawable/"and 'android:fastScrollThumbDrawable="@drawable/". And also consider what @Gouse Mohiddin has said. You need to have enough rows inside to make it scrollable.

0
votes

Please check the data you passed to list view because fast scroll is only displayed when you have more list items to scroll.

Make sure you have these lines in recycler view tag

app:fastScrollHorizontalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollHorizontalTrackDrawable="@drawable/line_drawable"
app:fastScrollVerticalThumbDrawable="@drawable/thumb_drawable"
app:fastScrollVerticalTrackDrawable="@drawable/line_drawable">