Adding scrollbars in a Custom View

by Neha » Fri, 05 Mar 2010 18:15:40 GMT

Sponsored Links

I am working on adding vertical and horizontal scrollbars in a custom
drawn View. I have overridden the compute*ScrollOffset,
compute*ScrollRange, etc methods and have enabled the scrollbars by
called set*ScrollBarEnabled. However, I do not see the scrollbars in
my View, even after a call to scrollBy, which according to the
documentation calls awakenScrollbars (I assumed awakenScrollbars is
not required as the scrollbars do not auto-fade -
isScrollbarFadingEnabled returns false).
Does anyone have a sample with scrollbars in a custom view which they
can share? Or provide any pointers as to how this should be fixed?

Any help would be appreciated.


Adding scrollbars in a Custom View

by Jonas » Fri, 23 Apr 2010 08:04:53 GMT


Did you get any help with this question, I am having the same problem.
No scroll bars are displayed. I also wish to get the Y position of the
scrollbar and see if it is bigger or smaller than screen width / 2.



Sponsored Links

Other Threads

1. Use of Service class

Service class is used to run something in background but for that we
have to create a thread in the onStart function of the subclass of the
Service. I think same thing can be done by creating a thread in
Activity class then what is the use of the Service component?


2. using usb to PC with Internet sharing (opposite of tethering) ??

I have a measured 3G data plan - so many bytes, so many cents. I want
to access the Internet, but not on 3G

I have been unable to find out if it is possible, when my Android
(Nexus one) is connected to my PC (Windows 7) and my PC is connected
to the Internet I can use what Microsoft calls "Internet Sharing".

Is this too simple?

Bernard Higonnet


3. Layout question.

4. live singleton after ending activity

5. Best Application Development Tool

6. User selectable text in WebView

7. Reg: retrieving the phone number on an incoming call