How can i set the same image resource for a series of imagebutton using a for loop ?
ImageButton b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14,
b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27,
b28, b29, b30;
public void setresource() {
for (int i = 0 ; i <= 15; i++){
b[i].setImageResource(R.drawable.playzz);
}
}
The above code give error on b[i]
The type of the expression must be an array type but it resolved to int
The type of the expression must be an array type but it resolved to int
– Sai Kiran Jun 8 at 4:46