0

I want to create a build time switch res directory project,for which each resource folder having image/icons with same name but different image/icons.

for example: res1>having abc.png of pink color res2>having abc.png of orange color

First is this possible? Is there any way to choose this at build time? or ant build easy tutorial or any other way....

Hanry
  • 5,481
  • 2
  • 40
  • 53
  • no its not possible. R.java file wont create at runtime. – Padma Kumar Apr 04 '12 at 11:56
  • any other way to handle this situation?? – Hanry Apr 04 '12 at 11:57
  • keep only one folder and naming to your resources as abc1.png and abc2.png thru program you can change it. – Padma Kumar Apr 04 '12 at 12:31
  • I'm pretty sure you'll have to do it at runtime dynamically. Unless you rename the res folder yourself before building the application :S – Jean-Philippe Roy Apr 04 '12 at 12:31
  • I have been provided with two separate res folders,and I require to build differnt apk using that. – Hanry Apr 04 '12 at 12:53
  • Rename res1 to res, build your APK, then rename res2 to res and build your APK again. You should then have two APK, one with orange images the other with pink images. – Jean-Philippe Roy Apr 04 '12 at 14:04
  • It is possible if you adopt some command-line tools like Ant or Maven dominate build process. If using Maven, it is pretty easy, example case study [here](http://stackoverflow.com/questions/9699485/skinning-android-app-with-maven-build-profiles) and [here](http://stackoverflow.com/questions/9371698/speeding-up-the-android-build-process/9372333#9372333). – yorkw Apr 04 '12 at 21:18

0 Answers0