views:

66

answers:

1

Hi!

How would you implement different color themes in your app? All I can see now is plain set color onCreate every activity and control...

Also, how would you store different color schemes in xml? Just an entries of with different names?

Thank you!

+1  A: 

Use custom Themes, which are declared in XML. They are very similar to CSS, if you've used them before.

EDIT:

Here's a better example of changing the theme at run time

I82Much
thanks for answering! search little more and found how to change theme on runtime http://stackoverflow.com/questions/2482848/how-to-change-current-theme-at-runtime-in-android
Max Gontar
Good find - yup sometimes it's hard to know exactly the term to search for (obviously searching for Themes is going to get you a lot better results than a more general search like "changing color android"). I'll edit my answer to include the link you posted.
I82Much