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. Huawei U8230 Official Eclair + Rooted

Buat RR yang punya Huawei U8230,
beberapa hari yang lalu ada update menarik :

sudah ada ROM Update Eclair Official punya T-Mobile Hungary.

saya udah coba dan juga sekalian apply 4-5 macem Custom ROM, mantaf dah!
touch screen semakin repsonsif, cepet, dan dengan layar sebesar iPhone,
HSPA, WiFi, lumayan banget deh :)
minus :
1. gak bisa downgrade ke Cupcake (ada gitu yg mau downgrade setelah
merasakan Eclair? hohoho)
2. free mem setelah apply custom ROM hanya 40MB. kurang banget ya T_T ....
yah mau gemana lagi, wong RAM nya cuma 128MB. CMIIW.
3. colokan audio nya model yg kecil gitu :P

okey, ini share saya, mudah2an ngga repost.

ini ringkasan nya :

   1. Apply flash ROM Eclair Official dari T-Mobile Hungary dulu, download
   di sini : http://bit.ly/cWhrbb
   2. Baca baik-baik step Upgrade ke official ROM tsb di sini :
   http://bit.ly/cPXHkJ
   3. Install custom recovery image (Amon Ra) : http://j.mp/9hKAyc
   4. Flash Custom ROM melalui custom recovery image.
   5. Reboot HH
   6. Flash salah satu frameworks (optional tapi recommended) :
   http://j.mp/9qPeYd

Framework tsb hanya akan rubah graphics di Pulse, ga ada tambahan launchers
/ widgets.


ini beberapa Custom ROM yang udah saya coba :

   1. http://bit.ly/9EklfH
   2. http://bit.ly/aWL2bL
   3. http://bit.ly/acCCdY
   4. http://j.mp/934Iqz
   5. http://j.mp/Pulse_Paul_MCR_R7

silahkan mencoba, semoga berhasil :)
Salam

-- 
"Indonesian Android Community [id-android]" 

2. We need developer feedback, Please stop allowing rating when customer has canceled order, their done

You can design YOUR program to have an interface in any way YOU like.
The way that YOUR program works has NOTHING to do with ANDROID, and
everything to do with how you wrote it.

If YOUR customer is complaining that YOUR interface is too
complicated, then you really have two possibilities;
1) Your customer is a retard.
2) Your interface really IS too complicated.





-- 

3. Why ADB and DDMS cannot recognize my phone in Ubuntu?

4. Password lock screen in android

5. Fring 2.1.0.

6. Android 2.2 : Quick contact on home screen : missing anchor

7. SPICA - ROOTED only ARM11-optimized libdvm.so