I defined two themes with different initial, primary dark, primary 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>
The default AppTheme for <application/> Then I install AppTheme2 in specific actions.
In the drawn xml file, I use the same AppTheme primary colors as in colors.xml
Selectable is used in many actions from both topics, so when there is AppTheme2, I see different colors. Is there a way to make usable the colors of the current theme for the current activity?
android xml runtime xml-drawable android-theme
user3290180
source share