Hi All,
So I am toying around with a simple app which has an image on a ImageButton, and when clicked it uses the ImageButton.setImageResource() to set the image on the button...simple enough.
public void onClick(View view) {
myButton.setImageResource(R.Drawable.icon);
}
public void codeToClearImageButton(View view) {
/* help me!! */
}
My question is how do I remove the image from the ImageButton so it is blank like it was in its original state? I can't find anything like a unsetImageResource() or something like that. Anyone have any pointers?
Thanks.
So I am toying around with a simple app which has an image on a ImageButton, and when clicked it uses the ImageButton.setImageResource() to set the image on the button...simple enough.
public void onClick(View view) {
myButton.setImageResource(R.Drawable.icon);
}
public void codeToClearImageButton(View view) {
/* help me!! */
}
My question is how do I remove the image from the ImageButton so it is blank like it was in its original state? I can't find anything like a unsetImageResource() or something like that. Anyone have any pointers?
Thanks.