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. Run Android 2.0.1 on HTC magic

Hi all,
I'm trying put the Android 2.0.1 run in HTC magic. I already compile
all source code with HTC magic drivers. I flash the new system.img on
system partition and the system start well. however when run the
desktop i get some errors:


I/ActivityThread(  180): Publishing provider
com.android.launcher.settings: com.android.launcher.LauncherProvider
D/installd(   68): DexInv: --- BEGIN '/system/app/VoiceDialer.apk' ---
I/ActivityThread(  180): Publishing provider com.android.social:
com.android.providers.contacts.SocialProvider
I/ContactsDatabaseHelper(  180): Bootstrapping database
E/Database(  180): Failure 14 (unable to open database file) on
0x1485f0 when executing 'CREATE UNIQUE INDEX nickname_lookup_index ON
nickname_lookup (name, cluster);'
E/SQLiteOpenHelper(  180): Couldn't open contacts2.db for writing
(will try read-only):
E/SQLiteOpenHelper(  180): android.database.sqlite.SQLiteException:
unable to open database file: CREATE UNIQUE INDEX
nickname_lookup_index ON nickname_lookup (name, cluster);



W/dalvikvm(  180): threadid=3: thread exiting with uncaught exception
(group=0x4001e180)
E/AndroidRuntime(  180): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  180): java.lang.RuntimeException: Unable to get
provider com.android.providers.contacts.SocialProvider:
android.database.sqlite.SQLiteException: Can't upgrade read-only
database from version 0 to 105: /data/data/
com.android.providers.contacts/databases/contacts2.db



someone know how i resolve this trouble?

Best Regards,
Andr Barbosa.

-- 

2. Android Emulator without a Camera, Camera.open() != null ????

Hi,

So I made an AVD with hw.camera set to no, the default. I have uses
feature for both camera and autofocus set and required=false. I also
have the Camera permission set. I just want to make sure I don't
expose a confusing UI to people without a camera. So I thought this
would make the OS uphold the contract for
http://developer.android.com/reference/android/hardware/Camera.html#open(int)
which should return null ... but it never does? What's the deal?

-- 

3. SipManager 2.3 SDK

4. Getting relative positions of elements in a grid view

5. how to build an unsigned application in the source code

6. listing all installed certificates on android device

7. switch between two or more screens