Adding scrollbars in a Custom View

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


Sponsored Links
 Hi,

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.
Thanks!

--



Adding scrollbars in a Custom View

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


 Hi,

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.

BR
Jonas




--


Sponsored Links


Other Threads

1. Where can I catch a point that is assured to be called when a Service is destroied

> I have a Service, it is started by StartService(...), my program never

There is no "right point" for those scenarios. Your code will not be
called. Hence, do not wait to be destroyed to "clean up and save
settings".

And, please do not leave your service running all of the time:

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 

2. How to keep mobile network alive even if screen is off

Dear everyone,
     I want my service keeps network connection alive even if user
presses the power button to shutdown the screen. As I have tested,
socket will return exceptions and through CONNECTIVITY_ACTION intent,
i know EXTRA_NO_CONNECTIVITY is true. So can current Android keep
connection not closed when screen is off?

-- 

3. Busy Coders Guide is 拢204/$24 0 on Amazon...

4. <WTA> force close dream...

5. Replacing existing TabHost content

6. request queue pointer null in add_disk

7. Busy Coders Guide is 拢204/$240 on Amazon...