android change image button background -
i cannot seem change background image of image button. heres code i'm trying use:
imagebutton imgbutton = (imagebutton) findviewbyid(r.id.showsportsbutton); imgbutton.setbackgroundresource(r.drawable.tab2_selected);
however seem placing new image on top of old image leaving me 2 images overlapping each other.
does know why is??
for solving question should implement
imgbutton.setimageresource(r.drawable. tab2_selected);
Comments
Post a Comment