[实战] 关于Android Studio Image Asset 选项,设置app icon

本文介绍了Android 8.0引入的Adaptive Launcher Icons,这种图标能在不同设备上展示各种形状。Adaptive Icons由背景和前景两层构成,允许设备OEM自定义图标形状。同时,文章提到了针对API 25及以下版本的legacy launcher icons,并指导如何通过Image Asset Studio设置适应不同API级别的app图标。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Android Studio,通过 Image Asset 选项可以设置ic_launcher. 今天用了之后发现低等级的API并不能正确设置 app icon。阅读文档发现 adaptive icon的概念在8.0被提出。


附上原文。
Android 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models. For example, an adaptive launcher icon can display a circular shape on one OEM device, and display a squircle on another device. Each device OEM provides a mask, which the system then uses to render all adaptive icons with the same shape. Adaptive launcher icons are also used in shortcuts, the Settings app, sharing dialogs, and the overview screen.

You can control the look of your adaptive launcher icon by defining 2 layers, consisting of a background and a foreground. You must provide icon layers as drawables without masks or background shadows around the outline of the icon.


文中提到新的定义中App icon有两层,例如底层设置一层底色,上层设置一个图标,这样不同的设备可以根据需要裁剪成需要的形状不管是方形或是圆形,我们常

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值