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

試著忘記壹切 提交于 2020-01-02 03:54:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!