在网上找了多,今天发现一个坑,再一个8.0的华为手机上显示有问题,圆形图标中的icon放大了,被裁掉了。我是用的系统的new image assets 方式做的,分文没动。背景是个color,
解决办法是android:roundIcon="@mipmap/ic_launcher_round"这个地方对应的anydpi-v26里面的ic_launcher_foreground是对应的是mipmap,把所有对应的mipmap 从hdpi,mdpi,xhdpi,xxhdpi,xxxhdpi全部放到drawable中。
最后是这样的<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
网友评论