So, I have been working on this application for a couple of weeks, and I started to create an icon. I have Android Studio 3.0.1, and they seem to have changed the way they create the image, now they have responsive icons. I made an icon with a transparent background for my application. Previously, I would just change the shape to "none" and the background would not be generated. But now this is not an option, if I do not go to the "legacy", which is useless. The background color does not seem to support transparency. Even if in ic_launcher.xml
I set the background to a transparent color, but the icon is still displayed with a black background.
Here is my ic_lancher.xml
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/transparent"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
And ic_launcher_round.xml is the same. The bit @color/transparent
is as follows:
<color name="transparent">#00000000</color>
source
share