Can we have a custom scrollbar on an ScrollView?
Asked Answered
G

0

2

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

Genitalia answered 2/12, 2011 at 11:56 Comment(4)
Possibly a duplicate of this?Horgan
Not really, I'm talking about ScrollView and not ListView.Genitalia
ScrollView extends a FrameLayout. Modifying a ScrollView just means extending the existing ScrollView or Creating your own ScrollView which extends the FrameLayout. This is exactly done in the answer to that question.Horgan
Indeed... it's quite the same thing, it's the same approach. Please answer me your response, i will validate you it.Genitalia

© 2022 - 2024 — McMap. All rights reserved.