Skip to content Skip to sidebar Skip to footer

Make A Button's Background Transparent

I am very new to Android Studio and creating apps in general. I have created an Image Button and uploaded an Image, problem is that I want to make the background of the Button tran

Solution 1:

Just put this property inside ImageButton tag:

android:background="@android:color/transparent"

----------OR--------------

You can also user vector image for this:

  1. Click on Vector Asset enter image description here

  2. Click on small icon image(just below ic_android_black_24dp) enter image description here

  3. Search any icon and add to your drawable. The icon you are using is appeared in search result. use this list icon. enter image description here

Solution 2:

Try This

  <ImageButton
    android:layout_width="wrap_content"
    android:background="@android:color/transparent"
    android:src="@drawable/image"
    android:layout_height="wrap_content" />

Post a Comment for "Make A Button's Background Transparent"