[android-developers] Re: Building user interfaces at runtime with layouts from server

2016-01-07 Thread Matias Furszyfer
hi everyone, i built a runtime parser, this needs a lot of work and a community to expand and improve it. in the first version i am not using reflections but in my second version i am currently testing to integrate it. this is my project https://github.com/furszy/ViewInflater It would be great

Re: [android-developers] Re: Building user interfaces at runtime with layouts from server

2016-01-02 Thread Luis Carlos Ramírez Rodríguez
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. >

Re: [android-developers] Re: Building user interfaces at runtime with layouts from server

2016-01-02 Thread Kristopher Micinski
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

Re: [android-developers] Re: Building user interfaces at runtime with layouts from server

2016-01-02 Thread Kristopher Micinski
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 wrote: > The problem is that XmlPullParser requires for the XML definition to be > present at the APK build-time. What

Re: [android-developers] Re: Building user interfaces at runtime with layouts from server

2016-01-02 Thread Kristopher Micinski
Sorry, that was a bad link. It didn't talk about pull parsers, but rather DOM parsers. Here's a better one: http://stackoverflow.com/questions/5409940/android-xml-pull-parser-from-url On Sat, Jan 2, 2016 at 4:03 PM, Kristopher Micinski wrote: > What? No it doesn't: > >

[android-developers] Re: Building user interfaces at runtime with layouts from server

2015-12-31 Thread Luis Carlos Ramírez Rodríguez
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

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-27 Thread Daniel
Mark, thanks for your answer. You are absolutely right. This is an open source project. Yesterday I was just a bit annoyed to see that it won't work as easy as I hoped. I'll file an issue. On Mar 26, 4:08 pm, Mark Murphy mmur...@commonsware.com wrote: I chose the do it yourself approach and

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-27 Thread Daniel
Hi Lutz. Thanks for your answer. What you propose is what I tried first in different variations: XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser xpp = factory.newPullParser(); The returned xpp is an instance of org.kxml2.io.KXmlParser and thus cannot handle the

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-26 Thread Daniel
I chose the do it yourself approach and parse the layout.xml by myself. The simple part (reading the element names and building the widget tree) works quite well. Then I wrote an own implementation of android.util.AttributeSet which wraps a org.w3c.dom.NamedNodeMap. When I try to instantiate a

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-26 Thread Mark Murphy
I chose the do it yourself approach and parse the layout.xml by myself. The simple part (reading the element names and building the widget tree) works quite well. Then I wrote an own implementation of android.util.AttributeSet which wraps a org.w3c.dom.NamedNodeMap. When I try to instantiate

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-26 Thread Lutz Schönemann
The point is now: Android already has this user interface description (layout.xml) and the code which inflates such a description (in preprocessed form) to a user interface. It would be awesome to reuse this code! You can use that LayoutInflater to create the tree of views and attach it to

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-24 Thread Daniel
Thanks for your response. My use case is as follows: We have a server application which allows to be extended by plugins. Each plugin contributes a view and some logic. Until now, the only client we support is a web client. Every plugin contributes a jsf based xhtml page plus some java beans.

[android-developers] Re: Building user interfaces at runtime with layouts from server

2009-03-23 Thread droozen
We might have to know why you want to build this way. There could be other possibilities, including using a much simpler xml that you could parse yourself and add UI elements programmatically. Or have a variety of layouts available that you could set, depending on a value you've downloaded,