【发布时间】:2013-11-15 14:26:50
【问题描述】:
我有以下代码:
Button x = (Button) findViewById(R.id.button1);
x.setBackgroundColor(Color.BLACK);
我在 setBackgroundColor 行收到以下错误:
Syntax error on token "setBackgroundColor", Identifier expected after this token
我正在尝试手动更改颜色代码,因为这取决于用户是否单击了按钮......
- 我确实有一个 ID 为“button1”的按钮
谢谢!
【问题讨论】:
-
你能发布更多这个活动的代码吗????
标签: java android eclipse button