Can we have a custom scrollbar on an ScrollView?

2019-05-28 21:10发布

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

0条回答
登录 后发表回答