android - Load different colors based on conditions -


i programming application contains layouts views. load these colors values/colors.xml. now, want define multiple themes application, e.g. blue , green (some sort of blue , green colors). question how can define 2 colors.xml file , load based on conditions or choosing user. want thing strings.xml can load strings based on locale defined.

thanks in advance.

string.xml <?xml version="1.0" encoding="utf-8"?> <resources>  <string name="white">#ffffff</string> </resources>  values-fr/strings.xml <?xml version="1.0" encoding="utf-8"?> <resources>   <string name="white">#eeeeee</string> </resources>   button.setbackgroundcolor(integer.parseint(getstring(r.string.white))); 

Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -