How to specify parameters used in XML, in code instead?

by hc » Tue, 08 Sep 2009 10:45:24 GMT


Sponsored Links
 I'm trying to do part of my Activity layout in code rather than XML,
but I realize not all the parameters are available in code. For
example

with HorizontalScrollView, there are
android:scrollbarSize
android:scrollbarTrackHorizontal
android:scrollbarThumbHorizontal

corresponding setter methods are not available in code,
unlike android:background that has setBackgroundResource

I'm hoping there's something similar to addRule in LayoutParams, where
I specify the parameter as the first argument, and the value as the
second argument.

Thanks
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Successfully ported Android on Beagle Board.

Hi  All,

We have successfully ported (custom) open source Android to beagle 
board.  This is very initial version. We have tested it on MMC card and 
on NFS.
Please find below link for uImage and root filesystem.

http://embdroid.homeftp.net/ANDROID.tar.bz2

You can watch Beagle board booting Android here:-
http://in.youtube.com/watch?v=3cetZMUWBHY

I will get back with more details and update very soon.
Enjoy Androing...

Regards,

-- 
Rupesh Gujare
http://embinux.com


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: 

2. Not able to locate any database on Emulator

Hi all,

I am not able to locate any database on Emulator through the shell.

I have tried with the Notepad application. The application is working very
properly and creating notes, but I can't see the application's table and
database from the shell.

# sqlite3 data/data/com.android.demo.notepad2/databases/data.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables

This fetched me nothing.

I even tried

# sqlite3
data/data/com.google.android.providers.contacts/databases/contacts.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables

But without success.

I would really appreciate if someone can provide any idea about this.

Thanks in advance,
Vaibhav

--~--~---------~--~----~------------~-------~--~----~

3. After executed /init, VM is not running...

4. ADB blue-screen when installing my app

5. Scrolling with Multiple ListViews

6. Toying with MapView

7. About the screen width and height???