Need way to to auto-switch layout designs

by dawnj2sb » Wed, 12 Aug 2009 01:35:20 GMT


Sponsored Links
 I don't know a lot about *.properties files, but i think that is what
I'm looking for.

I'm creating a project that will first be released under one company
name, and then later under another company name. I have been asked to
design the project in a way that all i have to do is switch out a
value and the images/styling will update accordingly.

So let's say I have a file (not sure what type of file) that contains:

product=ob

Then I could set up my *.java and layout *.xml files something like
this:

JAVA: setContentView(R.layout.login_${product})
Layout: <ImageView android:src="@drawable/logo_${product}" />,
<TextView style="@style/FormText${product}" />
Styles: <style name="Theme.AppBackground" parent="android:Theme"><item
name="android:windowBackground">@drawable/back_theme_${product}</
item></style>

Then all i do is change the value of 'product' in one file and
everything updates for the next build.

Does anyone know how to do this? Are there separate methods for doing
it in JAVA files vs XML files?

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



Other Threads

1. Androlib in your Gtalk..

Hi all,
You can now search Android apps from your Gtalk with  AndroLib Gtalk
Bot.
Just add in your Gtalk contacts, type your query, and the search
result will be sent to you.So enjoy the new features.........

2. Solved: OpenGL; GL11.glDrawTexiOES does not seem to work for Nexus One

Solution found:

Thanks, everyone, for your help!

This was the problem:

Just before my backgrounds were drawn, parts of my objects were drawn
with this called in the GL:
gl.glFrontFace(GL10.GL_CW);

On any other Android phone, this was fine. But on the Nexus One, it
causes the glDrawTex to fail (actually, not fail. No error is
reproduced. It just doesn't do anything).

I fixed it by calling gl.glFrontFace(GL10.GL_CCW) before my
backgrounds are drawn.

I guess i was looking at the back of the textures :-)



> Thanks!

3. tanya handphone android di indonesia

4. Issue on ril communication with external modem

5. How to used float variables in diver code?

6. Eclipse Crashes

7. Closed!! Apn axis