Androider Androider - 1 year ago 314
Android Question

ImageButton Border Transparency - How do I remove the square border around round image?

I think my image is transparent, but I am seeing a grey background appearing around the edges of my image which is round. So instead of nice transparent round ImageButton I am seeing square edges. I need to provide height or it complains but now I have outline of grey/silver square instread of just round image.

Answer Source

Set this attribute in your ImageButton XML android:background="@null"

<ImageButton android:src="@drawable/yourimagename"
     android:layout_width = "wrap_content"
     android:layout_height = "wrap_content"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download