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. Development versions of proprietary Google applications

Hi,

I was wondering if there's any chance that you will release
development versions of the proprietary Google applications. I'm
guessing that the 'trunk' or 'main' version of them will be stable
enough for people to use them in their personal builds. I've been
diving into the source code of the platform, but if I compile the
system and put it on my Dev Phone, it's of course missing the Google
applications. These applications with their integration to the Google
services are a part of what makes the entire platform so interesting.

To clarify a bit: I'm not asking for those applications to be open
sourced, I'd just like to see regular builds of the applications and
used libraries, so we could include them in our own development
version of the platform. Of course the development version are not
suitable for 'production-critical' environments, but I'm guessing that
the main branch will be stable enough for developers to use.

Thanks,

Sander

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

2. Can I close automatically the browser when I use it to start another activity ?

Hi,

I want start a video stream and I have a link with http:.
With a redirection or other the android's browser can find the link
rtsp:.

My problem is when I stop the video, the browser is again there and
empty.

In the LOG:
I/ActivityManager(   54): Starting activity: Intent
{ action=android.intent.action.VIEW
categories=android.intent.category.BROWSABLE} data=http://site/t.cgi
comp={com.android.browser/com.andr
oid.browser.BrowserActivity} }
I/ActivityManager(   54): Starting activity: Intent
{ action=android.intent.action.VIEW
categories=android.intent.category.BROWSABLE} data=rtsp://dsfsdf.sdf/
54454 comp=com.android.camera/com.android.camera.MovieView} }

Can I close automatically the browser when I use it to start another
activity ?(with an intent.category or a other intent.action)
Other solution : Can I close the browser after the end of the activity
"MovieView" ?
Other solution : Can I find the good redirection rtsp without the
android's browser ? (don't work with HttpGet)

Thanks.

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

3. How can I send SMS or call on CDMA

4. How to instrument code to find an OutOfMemory error (in WebView?)

5. Help required to get Android userland to boot on Gumstix Overo (TI OMAP 3503) + Palo43 LCD expansion board

6. IPv6

7. amr-wb codec in .3gp file format