Can we have a custom scrollbar on an ScrollView?

好久不见. 提交于 2019-12-08 02:20:06

问题


I'd like to make a custom scrollbar for one of my scrollview, and impossible to find how to do.

I want my scrollbar to be more visible, and controllable like the fastScroll of the ListViews. Unfortunately there is no setFastScrollEnabled(true) on the ScrollView.

\o/ So say welcome to my two first questions :

How to change the scrollbar appearence?

How to activate fast scrolling on a ScrollView?

Then another idea come to me : adding buttons and indicators on the scrollbar, as a goToTop and a goToBottom, a progressBar, etc... and so making this little bar an ergonomic tool for users. (for exemple a expandable contextual menu)

So if the first questions have good answers, I've a second step question :

How to add buttons and setOnClickListener this new ScrollBar?

To illustrate it :

On the left : FastScroll on ScrollView

On the right : ErgonomicScrollBar on ScrollView

An image to illustrate it

来源:https://stackoverflow.com/questions/8355984/can-we-have-a-custom-scrollbar-on-an-scrollview

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