My main app theme parent is MaterialComponents theme. I changed the colors, but material components (MaterialButton, InputLayout, EditText) are not using my accent color (they are using some blue color, my declared Accent color is Teal) What is the issue? How is the best way to deal with theming Material Components?
My main theme:
<style name="AppTheme" parent="Theme.MaterialComponents">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
Edit: Changing theme to Theme.MaterialComponents.Bridge is not solving that problem.
The issue in my case was a different styles.xml
declared for the specific API. I made a mistake in it, and when testing, that other values-v21/styles.xml
was applied before styles.xml
.
So long story short, check if the mistake is not present in other variants. I declared that variant wrong.