I have defined two themes with different primary, primary dark, primary light and accent colors.
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
</style>
<style name="AppTheme2" parent="AppTheme">
<item name="colorPrimary">@color/primary_2</item>
<item name="colorPrimaryDark">@color/primary_dark_2</item>
<item name="colorAccent">@color/accent_2</item>
</style>
AppTheme is default for <application/>
Then I set AppTheme2 in specific activities.
In a drawable file xml I'm using the same primary colors of AppTheme defined in colors.xml
The drawable is used in many activities from both themes, so when there is AppTheme2 I see the different colors. Is there a way to make the drawable use the colors of the current theme for the current activity?