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. Intent and URI conversion problem (intent.toURI, Uri.parse)

setData() does just what it says -- sets only the data field to exactly the
Uri you provide.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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

2. ThirdParty OMX IL 1.1 Compliant Component Shared Library

Hi,

Can anyone please tell me, where I can place the ThirdParty OMX IL 1.1
Compliant Component Shared Library(.so) in PV framework.

I am using Opencore 2.0.

Thanks&Regards,

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

3. driving/walking directions on mapview and clearing of application(map) cache

4. Intent and URI conversion problem (intent.toURI, Uri.parse)

5. ActivityGroup , Alerts and Configuration changes

6. Problems with creating a Hello World Application for Android

7. Non-Ti Wifi driver