[FIXED] Remove the white space around the jpg image button in android studio


I’m trying to set an image button. But when I use it on android studio, it has white space and has thick grey border around it.(its not visible when you view it in photos apk). I’ve used android:adjustViewBounds="true" attribute but it did not work. How can I remove border and white space? (using android studio or other apk)

code for imageboutton:

        android:src="@drawable/add_button" />

This is how it looks in android studio / on phone :

enter image description here

And this is how it looks in photos apk(windows) :
[enter image description here]2]


That’s an ImageButton. It’s a button with an image. The gray border is the button. If you don’t want that and just want a clickable image, use ImageView instead of ImageButton

Answered By – Gabe Sechan

Answer Checked By – Laura B. (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published