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. How to display soft keyboard unlock screen for keyguard in cupcake

How do you go about making your application run in the KeyGuard
context? It's my understanding that KeyGuard runs in the system
process, have you integrated your customized screen into the platform?




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

2. Failed to create email account on emulator.

Hello,

      When I create email account, it prompts "Unable to open
connection to server". But the browser application can connect to
server after  I add proxy setting in settings.db.
      Is there other settings for email application?
      Thanks.

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

3. How to get Locale change event

4. awkward spinner OnItemSelectedListener behaviour

5. G1 Email Font Size

6. Better way to protect priced app?

7. Instrumentation's sendKeyDowUpSync()