[英]App icon size on Android 8.0 if targetSdkVersion >= 26
My app has a square icon. 我的应用有一个方形图标。 When targetSdkVersion
< 26 the app icon is shown correctly on all devices. 当targetSdkVersion
<26时,应用程序图标会在所有设备上正确显示。 But with targetSdkVersion
>= 26 the app icon is shown inside a white circle on Android 8.0 devices. 但是使用targetSdkVersion
> = 26时,应用程序图标会显示在Android 8.0设备上的白色圆圈内。 Is there a way to remove the white circle? 有没有办法删除白色圆圈?
Per the Understanding Android Adaptive Icons blog post : 根据了解Android自适应图标博客文章 :
Indeed Google's launcher will start placing icons of apps which target Android-O but do not supply an adaptive icon onto a background (scaling down their non-adaptive icon). 事实上,Google的发射器将开始放置针对Android-O的应用程序图标,但不会在背景上提供自适应图标(缩小其非自适应图标)。
You must add an adaptive icon to your app once you target API 26. As adaptive icons change their outer shape based on what device they are running on, you cannot rely on your launcher icon always being a square. 一旦定位API 26,就必须向应用程序添加自适应图标 。由于自适应图标会根据运行的设备更改其外形,因此您不能依赖于您的启动器图标始终为正方形。
The Designing Adaptive Icons blog post and Implementing Adaptive Icons blog post goes through more details on how you might take advantage of adaptive icon's separate background and foreground layers and how to implement an adaptive icon in your app. 设计自适应图标博客文章和实施自适应图标博客文章详细介绍了如何利用自适应图标的单独背景和前景图层以及如何在应用程序中实现自适应图标。 Android Studio also contains tooling to help via the New > Image Asset wizard as described in the Create app icons with Image Asset Studio article . Android Studio还包含通过New> Image Asset向导提供帮助的工具,如使用Image Asset Studio创建应用程序图标中所述 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.