Given:
Own topic, which inherits one of the standard ones, redefines some attributes and defines its own. Assigned to the application theme in the manifest.
Task:
Create a theme for another API so that it contains all the properties of an existing theme and redefines its attributes (for example, a theme for API> 21 , with the android:navigationBarColor attribute) that cannot be specified in themes for a lower API level.
Possible Solution:
- It is trivial to copy the theme definition into the
values-API_LEVEL/styles.xmland add the necessary attributes. Confused by the need to edit many files when changing the attributes common to all APIs . - Redefine your topic in a topic with a different name and assign it programmatically. Also an option, but I do not want to fence an extra code.
Question:
How can it be possible in the values-API_LEVEL/styles.xml to somehow redefine the theme so that it has the name identical to the theme name from values/styles.xml , values/styles.xml all the properties of this theme and defines new ones?