问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/18254370/how-to-add-draggable-scrollbar-to-scrollview-listview-in-android