Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add draggable scrollbar to scrollview/listview in Android?

I have a listView that uses a customListAdapter created by me. When user scrolls the list, he/she sees scrolling indicator as usual on the right side.

However, I want to show a draggable track-button on the right side, so user will be able to hold that button and quickly scroll through the list.

How can I do this?

like image 930
frankish Avatar asked Aug 15 '13 14:08

frankish


1 Answers

I believe the xml values fastScrollEnabled and optionally fastScrollAlwaysVisible are what you want to set for the ListView

android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true" 

fastScrollEnabled enables the dragging of the scroll bar.

like image 115
triggs Avatar answered Sep 20 '22 21:09

triggs