I have a scroll view with lots of image buttons. I want to change the image for an image button when it\'s pressed. The thing is that I want the image to remain until anothe
You want to do this.
ImageButton Demo_button = (ImageButton)findViewById(R.id.firstimage);
// when you click this demo button
Demo_button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Demo_button.setImageResource(R.drawable.secondimage);
}
}
Try this. (updated setset to set)