【发布时间】:2021-03-07 00:01:51
【问题描述】:
这是我的照片, It is the code in which i have written the color code
Here is android blueprint here the color doesn't change
我尝试了很多方法,比如通过样式添加,但都没有成功。
我也尝试过更改背景色调,但也无济于事。
如何更改按钮颜色?
我在上面的图片中分享了我的代码。
帮我换颜色
【问题讨论】:
-
嘿@Aryan 你的主题是什么。您是否根据要求设置了主题。我很确定按钮的颜色是因为您设置为应用程序的主题
-
@Venky 我有一个主题 xml,但我如何设置主题你能告诉我。我是初学者,所以不太了解,请告诉我
-
@AryanKalekar 使用
android:backgroundTint代替背景 -
您可以在 theme.xml 中设置一个按钮主题,然后在按钮之后调用stackoverflow.com/questions/26346727/…
标签: android xml button android-button material-components-android