What? No it doesn't: http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/
Kris On Sat, Jan 2, 2016 at 12:30 PM, Luis Carlos Ramírez Rodríguez <[email protected]> wrote: > The problem is that XmlPullParser requires for the XML definition to be > present at the APK build-time. What we are striving to find is a solution so > a remote server can feed data into the app, which the app in turn translates > into views that were not defined anywhere in the app itself. > > >> >> I'm not sure what the problem is: the method to do this has been in >> the API since level 1. >> >> > Viewinflate(XmlPullParser parser, ViewGroup root) >> > Inflate a new view hierarchy from the specified xml node. >> >> Create an XmlPullParser, set the reader to one you've pointed at the >> URI containing the content you want to read, and then use the view >> inflater to build the view hierarchy. >> >> Kris >> >> >> On Thu, Dec 31, 2015 at 1:58 PM, Luis Carlos Ramírez Rodríguez >> <[email protected]> wrote: >> > >> > It's been six years and I'm also looking for a solution to bind User >> > Interface with layouts stored on a remote server and i was wondering if >> > you >> > ever managed to solve this issue >> > >> > Thanks. >> > >> > -Carlos >> > >> > El lunes, 23 de marzo de 2009, 1:10:22 (UTC-6), Daniel escribió: >> >> >> >> Hi all, >> >> >> >> Q: What is the recommended way to build user interfaces on the device >> >> based on layouts provided by a server at runtime? >> >> >> >> I am aware of this: >> >> <snip source="http://developer.android.com/reference/android/view/ >> >> LayoutInflater.html"> >> >> For performance reasons, view inflation relies heavily on pre- >> >> processing of XML files that is done at build time. Therefore, it is >> >> not currently possible to use LayoutInflater with an XmlPullParser >> >> over a plain XML file at runtime; it only works with an XmlPullParser >> >> returned from a compiled resource (R.something file.) >> >> </snip> >> >> >> >> I could imagine these possibilities: >> >> - Parse XML by myself and build the ui tree. (Seems inappropriate to >> >> me since there is already maintained code which is able to do this.) >> >> >> >> - Transform XML on server to a simpler format which is cheaper to >> >> parse on the device. (Inappropriate as above.) >> >> >> >> - Preprocess the XML layout on the server the same way the build does. >> >> Transmit it to the client, and then try to load it. But how? >> >> android.content.res.XMLBlock is hidden (@hide) and I don't know how >> >> to >> >> classify the stuff in package com.android.layoutlib.bridge. >> >> >> >> Any help would be appreciated. >> >> Daniel >> >> >> >> >> >> >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Android Developers" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to [email protected]. >> > To post to this group, send email to [email protected]. >> > Visit this group at https://groups.google.com/group/android-developers. >> > To view this discussion on the web visit >> > >> > https://groups.google.com/d/msgid/android-developers/c09b3558-e006-436c-a1dd-2b0266a2ba7f%40googlegroups.com. >> > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/android-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-developers/9b4b2903-326b-4e36-bc42-f14833611189%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/CAF1Sy-EsDL4K1Vjnh2DHjGvmFpfwDHMhbq9otZXj5pNuBV2-yg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

