所以我已经在这个应用程序上工作了几个星期,我开始构建图标.我有Android Studio 3.0.1,他们似乎改变了Image Assets的制作方式,现在他们有了自适应图标.我为我的应用制作了一个带透明背景的图标.以前,我只是将形状更改为"无",并且不会生成背景.但现在这不是一个选择,除非我去"遗产",这是无用的.背景颜色似乎不支持透明度.即使在ic_launcher.xml我将背景设置为透明色,但图标仍然显示为黑色背景.
这是我的 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>
Run Code Online (Sandbox Code Playgroud)
和ic_launcher_round.xml是一样的.这@color/transparent是一个:
<color name="transparent">#00000000</color>
Run Code Online (Sandbox Code Playgroud) android ×1