Maksym Gontar
Maksym Gontar

Reputation: 22775

Android easy switch color-scheme of application

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!

Upvotes: 1

Views: 7367

Answers (1)

I82Much
I82Much

Reputation: 27326

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

Upvotes: 2

Related Questions