Importing a layout xml file from a remote server

by kingkung » Fri, 27 Jun 2008 01:10:34 GMT


Sponsored Links
 Is this possible?  Can I import an android layout xml file from a
remote server, and use it within the application (without writing my
own parser)?  If not, is there an easy way to parse out a remote xml
file and create a layout on the fly?

Thanks,

James


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



Importing a layout xml file from a remote server

by hackbod » Fri, 27 Jun 2008 08:59:01 GMT


 Currently view inflation only works on compiled XML resources.  Being
able to operate on any generic XML file is in the design, but won't be
available for 1.0.  Even if it was, I suspect the performance
difference between the two would be pretty disturbing.  Once the code
is open-source, I think a good project for someone would be to take
the current aapt code, and add an option so it can compile a single
XML file against the resources of an application (and system).  Then
your server could generate the XML file, compile it to binary, serve
that to the application, and let the app load its layout efficiently
from that.



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


Sponsored Links


Other Threads

1. adb devices command sees multiple offline devices attached - but it's the same device

Hi all
Is there a way to clear the list of devices?

What I'm seeing:
$ adb devices
List of devices attached
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    offline
HT842GZ47827    device

I've tried restarting the phone but the 'offline' entries don't go
away.  This is making it impossible to initiate a shell or logcat:
$ adb shell
error: more than one device and emulator

Is there a way to do this without rebooting my computer.

Thanks


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

2. SDCard and SQLiteOpenHelper problem

Hello,

I need to be able to work with databases on the sdcard.

I've been using the following code snippet from the NotePad
application and works perfectly on the emulator without using the
sdcard.

private static class DatabaseHelper extends SQLiteOpenHelper {
DatabaseHelper(Context context) {
super(context, "mydb.sqlite", null, 2);
}

When I include the path to the db as
 "/sdcard/application/mydb.sqlite"

the following error occurs
 10-29 09:57:04.798: ERROR/AndroidRuntime(200): Caused by:
java.lang.IllegalArgumentException: File /sdcard/application/
mydb.sqlite contains a path separator

The sdcard is properly emulated.
The path exists.

I've looked around but no obvious solution to me.

Any help greatly appreciated.

Cheers,
Wes

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

3. : How to stops the activity from getting restarted when mode changes from LandScape to Portrait or vice-versa

4. activity doesn't seem to end, despite calling .finish()...

5. "Wiring" emulator services to PC's

6. Carrymobile 's HTC Dream/T-Mobile G1/Google Andriod leather case released

7. pop3