自适应图标在无根像素启动器上不起作用



我在我的应用程序中添加了一个自适应图标。它在像素和像素 2 上运行良好。但是在带有无根像素启动器的Nexus 6上,它不起作用。我可以在Nexus 6上看到其他圆形图标,因此它适用于其他应用程序。

我的清单如下所示:

  <application
        android:name=".MyAppclass"
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/MyTheme">

mipmap-anydpi-v26我有看起来像这样的ic_launcher.xml

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_background_icon"/>
    <foreground android:drawable="@drawable/ic_foreground_icon"/>
</adaptive-icon>

我错过了什么?

谢谢。

事实证明,

我也需要在AndroidManifest.xml上使用roundIcon属性。

https://github.com/amirzaidi/Launcher3/issues/421#issuecomment-372961568

最新更新