XML generate

by Apoorva » Sun, 29 Jun 2008 20:47:28 GMT


Sponsored Links
 Hi

I want to write to R.layout.main.xml from my code to create variable
no of views simultaneously present on the screen. But for some reason
all the usual methods of generating an xml using JAVA fail to work
here. Kindly help.


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



XML generate

by Mark Murphy » Sun, 29 Jun 2008 21:23:14 GMT


 


You need to construct your Views using normal Java constructors (or 
factory methods, where applicable), and wire them together using 
ordinary accessor methods. I'm fairly certain the XML layouts are a 
design-time facility only.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android Training on the Ranch in September!  http://www.bignerdranch.com 

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


Sponsored Links


Other Threads

1. Get current location

How do I get the current location of the phone?
I'm not talking about registering for location updates on the location
manager and waiting for it to update upon change.
I'm talking about get the current position.

thanks!

Ori

-- 

2. IllegalArgumentException when trying to run an OpenGL ES 2.0 application

On what phone/AVD are you trying this? Not all devices support OpenGL ES 2.0.



> 

3. Multiple Instances of PV Player (Open source)

4. What exactly is Handler and Loopers in android ?

5. Query Google Maps

6. Rotate Image

7. Calendar Widget