Create Launcher icon with Image Asset without background color or xml in Android Studio 3.0.1

Perhaps you think this question is a duplicate of this . But since then, Android Studio has been updated, and the solution given there no longer works.

Why are we forced to have a background when creating an image? What is the reason for this? How should we change launcher_iconwithout any preparation? I see no way to turn off the background in the Image Asset.

Alternatively, I use an empty background, but this does not work in Full Bleed Layers:

<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
</vector>

Or just remove the background, but this will add a white background to yours launcher_icon:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Remove the background here and leave the foreground  -->
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Or change icon typeto Legacy Onlyand set shapeto none: enter image description here

However, there is a white background in the launcher icon.

, , Launcher Image Asset?

+1
1

, Android Studio, , , . , Image Asset, Shape None, .

, , Nova Launcher; - .

+1

Source: https://habr.com/ru/post/1690494/


All Articles