简体   繁体   English

如果targetSdkVersion> = 26,则在Android 8.0上应用图标大小

[英]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.

相关问题 如何使用targetSDKVersion&gt; = 26检测在Android 8.0上插入的耳机 - How To Detect A Headset Plugged In on Android 8.0 with targetSDKVersion >= 26 将targetSDKVersion从19更改为26时出错的Android应用 - Error Android app when change targetSDKVersion from 19 to 26 使目标targetSdkVersion和compileSdkVersion到26后,我的android apk大小增加了500kb - After making target targetSdkVersion and compileSdkVersion to 26, my android apk size increased by 500kb Android 8.0-Google API 26升级失败 - Android 8.0 - Google API 26 upgrade failure 如何在Android 8.0 Oreo API 26及更高版本上检测到应用终止 - How can I detect app kill on Android 8.0 Oreo API 26 and after 如何在android oreo(8.0)上的主屏幕上添加应用启动器图标? - how to add app launcher icon to homescreen on android oreo(8.0)? 应用启动图标未在Android 8.0 Oreo上以正确的方式显示 - App launch icon is not shown in proper way on Android 8.0 Oreo Android应用启动图标大小 - Android app launch icon size 如何将 targetSdkVersion 26 提升到 targetSdkVersion 30? - How to up targetSdkVersion 26 to targetSdkVersion 30? targetSdkVersion 28 ,FCM 通知图标显示为空白黑色,但使用 targetSdkVersion 20 它将显示完美的应用程序图标 - targetSdkVersion 28 , FCM notification icon shows as blank black , but with targetSdkVersion 20 it will shows perfect app icon
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM