如何去除Android应用程序图标周围的白线
我正在开发 Xamarin.Android 应用程序,注意到应用程序图标在运行 Android 11 的小米 Poco F3 智能手机上看起来不正确。
图标的顶部、底部、左侧和右侧有一条非常细的白线。似乎使用了方形图标并将其剪切以适合圆形,但它并不完全适合。
请参阅左侧第二个具有蓝色背景的应用程序图标:
该应用程序正在使用应用程序图标的旧方法:
建议的图标尺寸:48 x 48 像素 (mdpi)、72 x 72 像素 (hdpi) 等等... 在其他设备(三星 Galaxy S5 (Android 6)、Pixel 2 (Android 9))上看起来也不错。
mipmap 文件夹:
MainActivity:
[Activity(
...
MainLauncher = true,
Icon = "@mipmap/ic_launcher",
RoundIcon = "@mipmap/ic_launcher_round",
...
)]
目标版本:Android 11.0(API 级别 30)
最低版本:Android 4.1(API 级别 16)
未安装第三方启动器。
有人经历过类似的事情吗?可以在不创建新图标的情况下修复它吗?
I am working on an Xamarin.Android app and noticed the app icon doesn't look right on a Xiaomi Poco F3 smartphone running Android 11.
There is a very thin white line on top, bottom, left and right of the icon. It seems like the square icon was used and cut to fit a circle but it doesn't fit entirely.
See the second to the left app icon with the blue background:
The app is using the legacy approach for app icons:
Icon dimensions are as recommended: 48 x 48 pixels (mdpi), 72 x 72 pixels (hdpi) and so on...
and look fine on other devices (Samsung Galaxy S5 (Android 6), Pixel 2 (Android 9)).
mipmap folders:
MainActivity:
[Activity(
...
MainLauncher = true,
Icon = "@mipmap/ic_launcher",
RoundIcon = "@mipmap/ic_launcher_round",
...
)]
Target version: Android 11.0 (API Level 30)
Minimum version: Android 4.1 (API Level 16)
No third party launcher installed.
Anyone experienced something similar? Can it be fixed without creating new icons?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
小米红米 Note 8 Pro 也有类似问题。
由于某种原因 android studio 资源管理器没有创建 mipmap-anydpi-v26 文件夹。 (屏幕 1)
Res 屏幕
检查您是否有一个。
对我来说删除所有图标资源并创建新的帮助。 (不知道为什么,但重写它有错误。在此过程中丢失了一些)
Had similar issue on Xiaomi Redmi Note 8 Pro.
For some reason android studio resource manager didn't create mipmap-anydpi-v26 folder. (Screen 1)
Res screen
Check if you have one.
For me deleting all icon res and creating new helped. (Don't know why, but rewriting it is buggy. Some are missing during this procedure)
这是一个有趣的问题。您只需按照下面我的简单步骤操作即可。
1.右键单击“res”
2.新增-->图片资源
3.在 Asset Studio 窗口中,您将找到一个名为“缩放”的部分
就在“缩放”下方 -->调整大小。
现在您可以调整图标大小,这样就可以使白色薄层消失。我希望这会有所帮助谢谢。
That is an interesting question. You just have to follow my simple steps down below.
1. Right-click on the "res"
2. New --> Image Asset
3. On the Asset Studio window, you will find a section called "Scaling"
right below Scaling --> resize.
Now you can resize your icon and that is how you can make a white thin layer disappear. I hope this might help Thank you.