【发布时间】:2018-10-07 23:04:51
【问题描述】:
我正在尝试为我的 android 应用程序添加具有自适应图标功能的启动器图标。我面临的问题是该图标与 android Oreo 完美配合,但它显示了 pre Oreo 设备的 android 默认 android 图标。 如何根据不同的android版本设置启动器图标?
图标的清单代码:
android:icon="@mipmap/ic_launcher"
android:roundIcon="@drawable/ic_logo"
ic_launcher.xml
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_background"/>
<foreground android:drawable="@mipmap/ic_foreground"/>
</adaptive-icon>
【问题讨论】:
-
发布您的清单 XML。
-
你添加圆形图标了吗?
-
老问题。初读官方指南
-
@IntelliJAmiya 我遵循了指南,自适应图标正在工作,但无法为 pre-oreo 设备设置图标