I would like to be able to declare some themes to easily change the look and feel of my app. So I get that you can define a style inheriting from android:Theme and then define attributes within this.
But two questions:
- What if I want to have, say, more than one background color for different views within the app? So that I can have, say, a background to the whole activity and a different background to the text views in the activity and another background for buttons etc. But then have these (different) colours theme dependent?
- Is it possible to define a set of drawables which depends on the theme in use. I mean in a similar way to how you can define different drawables for different screen densities for example. Ideally I would have images with different color schemes used for the different themes. Can this behaviour be defined in android?
Thanks for your help,
James
You could just define different styles for the different colours or drawables required for each widget type and refer to those in your various themes. For example: