各位大侠,android代码中通过以下方式设置linearlayout背景颜色,编译时提示“The method setBackgroudColor(int) is undefined for the type LinearLayout”错误,百度上也有类似的写法,请大侠指点下哪里出错了,谢谢!
final LinearLayout ll = (LinearLayout) this .findViewById(R.id.LinearLayout01);
red.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
ll.setBackgroudColor(Color.DKGRAY);
}
});