我的主题是MaterialComponents主题。我已经更改了颜色,但是材料组件(MaterialButton、InputLayout、EditText)没有使用我的强调色(它们使用一些蓝色,而我声明的强调色是Teal)。问题出在哪里?最好的方法是如何处理Material Components的主题?
<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>
编辑:更改主题为Theme.MaterialComponents.Bridge并不能解决该问题。
@color/colorPrimary
和@color/colorPrimaryDark
是蓝色吗? - Jeel Vankhede