I have an application which has two client and for both client i
have different resources i.e. there images are different, themes are
different, fonts, styles, etc. But my code base is same for both. And
i have used XMLs for all above described item.
How can i manage images, themes, etc. by changing single config
variable or some other way such that if i build an app for one client
the other client’s resource should not be added in APK.
Can anyone know how to solve this problem please help me.
Thanks in Advance
Check out Styles and Themes.
Basically you can define multiple themes and apply the one you want at runtime (based on which client is detected). Each theme can have any UI item specified. But that is done at runtime, not at compile time.
For compile time, if you want to have multiple different APK based on a configuration, you can do that using custom Ant scripts. Check out these links for help on that:
http://code.google.com/p/autoandroid/wiki/AndroidAnt
http://www.disgruntledrats.com/?p=27
Android ant script workaround?
http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html