Problem:
I have saved a png image into the @drawable folder in android studio. This image is confirmed to have an alpha channel.
When I add it to an image view in a relative layout the alpha channel is lost
ImageView image:
xml layout code:
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
app:srcCompat="@drawable/icon_main"
android:id="@+id/main_icon_img"
android:background="@android:color/transparent"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_marginLeft="31dp"
android:layout_marginStart="31dp"
android:layout_marginTop="113dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
I have tried setting the background to transparent. If I save it to a mipmap then the image will show the alpha channel, although this is not my preferred method.
Is there a reason to why its appearing with a white background?