相关疑难解决方法(0)

android以编程方式设置按钮背景

我想知道如何以编程方式设置按钮颜色?我编写了以下代码但失败了:

Button11.setBackgroundColor(R.color.red);
Run Code Online (Sandbox Code Playgroud)

谢谢!!

android button

37
推荐指数
4
解决办法
9万
查看次数

标签 统计

android ×1

button ×1