0

I am trying to implement two different versions of the same application, the only difference being the color scheme. How would I go about displaying different drawables based on the version?

For example, let's say I have a Blue version and a Red version. I would like to use the same source code for both but have an easy way to convert between the two color schemes. I am confused on how I would tell Android that I want to use the Blue version (or Red) and have it access files perhaps in resources/drawables/Blue or resources/drawables/Red. I found the link below, but I don't understand how I can implement this using just one package. Is it possible?

Dynamically change the name of the resource file to be used?

Making resources theme dependent

Community
  • 1
  • 1
diimentio
  • 1
  • 2

1 Answers1

0

One way to do it is simply have a SharedPreferences int, where if it is 0, the app is in "red mode" and 1, it is in "blue mode". The downside of this is that you have to change the scheme in each activity.

ElectronicGeek
  • 3,312
  • 2
  • 23
  • 35
  • Thanks for your answer, but the problem with this is that my project is pretty big and I'd rather not have to go and change every activity. – diimentio Mar 13 '14 at 01:22