Android 更改启动器图标

问题描述

我按照以下路径在我的应用程序中添加一个新的启动器图标。

Res> new > Immage Asset 
            

enter image description here

enter image description here

enter image description here

enter image description here

和 AndroidManifest.xml 看起来像这样:

 <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

我想创建一个圆形标志,但我的手机有一个方形标志,但在模拟器上是一个圆形。这是什么原因造成的? (我手机上所有应用的logo也是方形的)

解决方法

您的应用程序图标,基本上是顶部带有蒙版的背景。不同的 Android 制造商使用不同的掩码。有些使用方形图像,有些使用圆形图像。因此,许多设备的结果是不同的。看起来您的设备碰巧使用了方形遮罩。

许多设备都可以选择在手机的常规设置中更改此设置。 例如。对于一加,您可以在“自定义|系统图标”下找到它