无法在 XML .Android studio 中更改按钮的背景颜色 [英] Can't change button's background color in XML .Android studio

查看:30
本文介绍了无法在 XML .Android studio 中更改按钮的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了 TableLayout 然后是按钮.按钮的颜色自动设置为紫色.所以我现在不能改变它们.这是我第一次来.

I created TableLayout then buttons. The button's color was automatically set purple. So I can't change them right now. It's my first time here.

推荐答案

别用别的东西

<androidx.appcompat.widget.AppCompatButton
<!-- attributes-->
/>

代替一个

<Button
<!--attributes-->
/>

一切都会很好.

快乐编码.

这篇关于无法在 XML .Android studio 中更改按钮的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆