[英]Adaptive icon doesn't work on rootless pixel launcher
我在应用程序中添加了自适应图标。 它可以在Pixel和Pixel 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.