这是我的代码,我的建议很清楚,但它不起作用。有什么问题?
String sp = "R.drawable.i" + gid;
int path = Integer.valueOf(sp);
switch (gid) {
case 1:
Layout.setBackgroundResource(path);
break;
case 2:
Layout.setBackgroundResource(path);
default:
break;
}