使用组件Button时系统默认蓝色背景,只需将res/values/themes.xml中的
Theme.MaterialComponents.DayNight.DarkActionBar改为
Theme.MaterialComponents.DayNight.Bridge即可
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Test" parent="Theme.MaterialComponents.DayNight.Bridge">
</style>
</resources>