Sure. Design some XML language -- the one Google used for layouts
would work but is rather complex and not focused on your particular
problem -- and I think you'd have to reimplement it to use non-
compressed XML. There's probably no need to give the server the
ability to design completely arbitrary screens anyway.

You might be able to leverage an existing dependency-injection
package, like Spring.

Then load this XML language and interpret it -- creating, adding, and
configuring views as indicated by the XML.

A HUGE downside to anything like this, is that you lose the ability to
customize and localize the layout. So you may want to consider passing
the screen resolution and size, language, and other potentially-
relevant information to the server, so the server can potentially
(possibly after release of the client) make decisions based on this
information.

On Jun 30, 10:53 pm, ABhi <abhishek.gonda...@gmail.com> wrote:
> I'm not sure if i understand the question correctly. My need is
> slightly different for dynamic screen generation.
>
> Hi All,
>
> I'm dealing with a problem you guys might not have faced earlier.
>
> I'm having a use-case in my Android application where the actual
> screen that i want to show to user is not stored in any layout file of
> my application. The layout of the of the screen is designed by server
> in this case, based on selection made by user on first screen.
>
> Let me elaborate here,
> 1st Screen : List of check box with different biller names.  (Imagine
> i've selected 2 billers from this screen)
>
> 2nd Screen :  (The screen that server has decided how it should look
> like)
> * Header,
> * 1st Biller name (Label)
> * Amount for 1st Biller TextBox
> * Image (a Separator image)
> * 2st Biller name (Label)
> * Amount for 2st Biller TextBox.
> * Here there can be a checbox/radio/another TextBox anything.
> * Image (a Separator image)
> * Button (to submit above form back to server)
>
> I hope makes some sense in what i'm planning to design.
>
> ---------
> The current issues i'm dealing with are as below.
> 1). How to draw this dynamic widgets?
> 2). How to fetch user Inputs from this dynamically created widgets?
>
> Thanks in advance.
> Regards
> Abhishek
>
> On Jul 1, 9:51 am, Bob Kerns <r...@acm.org> wrote:
>
>
>
> > Don't put it in the xml/ directory. That does indeed get compiled into
> > a binary format, and you'd need to use the corresponding API for
> > reading it.
>
> > (Or you could recode to use that API, and gain efficiency and space --
> > but first, you'd like to test the code you've already written, right?)
>
> > So put your test.xml into the raw/ directory instead of the xml/
> > directory (and use R.raw.test).
>
> > More info 
> > here:http://developer.android.com/intl/de/guide/topics/resources/providing...
>
> > And if you want to move it back and get the benefits of using the
> > compiled format, you'll access it starting with this 
> > API:http://developer.android.com/intl/de/reference/android/content/res/Re...)
>
> > On Jun 30, 12:36 pm, "RespeckKnuckles (John Licato)"
>
> > <respeckknuckl...@gmail.com> wrote:
> > > Hey guys,
>
> > > I have some xml files with a custom format (based on the scxml
> > > specifications) that I want my program to read. I've already written
> > > the code to read it, but I'm running into problems actually reading
> > > the file itself. I want the file to be compiled with the apk, as it
> > > will not be changed at all during run time. So I put the file
> > > (test.xml) in the res/xml/ folder, and got the inputstream by using:
>
> > > getResources().openRawResource(R.xml.test);
>
> > > but when I read in this inputstream it is complete jibberish, which
> > > makes me suspect it is being read in binary, as openRawResource() is
> > > often used for binary files like images, if I am correct. What is the
> > > correct way to do this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to