正如您在我的屏幕截图中所看到的,我的应用程序(Q2go)在启动器图标周围有一个白色边框。但如果我看“地图”为例,边框被移除,整个图标显示出来。

我看了很多讨论,但没有一个对我有效,因为我既没有使用android studio也没有使用Xamarin.Android。这是一个Xamarin.Forms应用程序,因此没有适用于安卓的图像编辑器(由于某些原因,仅适用于iOS )……或者我只是还没有找到它?
无论如何,我记得很多年前,有一种方法可以在没有容器的情况下强制渲染图标(这在不同的平台上是不同的。在Droid9上面,它是一个圆角矩形,而不再是一个圆圈……)
无论如何:如何删除背景上的白色边框?
[Activity(Label = "Q2go", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]发布于 2020-10-30 18:49:47
这就是你是如何做到的:
在参考资料中添加名为"mipmap-anydpi-v26“的文件夹,并添加两个名为icon.xml和icon_round.xml的xml。
内容:
icon.xml:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>icon_round.xml:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>现在在resources下添加另一个文件夹,并将其命名为"mipmap-xxxhdpi“,然后添加两个图像(都是您的徽标,都是圆形的,并将其命名为1)。icon.png和2.)launcher_foreground.png。
最后:复制我的主要活动属性,然后启动,现在看起来还不错。
然后轰隆一声
https://stackoverflow.com/questions/64606651
复制相似问题