android自适应图标如何制作,如何使用Android Studio创建适用于Android的自适应图标...

I have found myself with an issue on my android applications not been able to use adaptive icons, resulting in ugly app icons and strange shapes in different launchers, so... the solution was create adaptive icons and works perfectly. ????

On API's > 26 android implements adaptive icons, is possible that this causes issues on app icon in existing applications, just like the following example.

f0aa7067c0f5ea3b419e6ad5c77b2134.png

Example: Old app icons

To avoid this is necessary to create an adaptive icon. To do so, you need the following assets:

Image icon without background, example below (foreground)

Color background

4938347a18d2eb019f4d13f744eb2bc3.png

Foreground icon image

With this elements you need to follow these steps to generate the icon with the Image Asset Studio.

Open the project in Android Studio

Select the app folder

Go to File → New → Image Asset

On "Foreground Layer" select the provided image and resize in order to get the proper aspect for the icon

On “Background Layer" use the background provided

Click on Next button and then Finish

After that, the icons are created on the "mipmap-* * * *" folder

8af5ae38f1bf733c924ba42e9f84948e.png

Foreground layer configuration

7ea631fd7f5cef24264e5b1e2b8dc25a.png

Background layer configuarion

287466a38de82b564ad73186b836d439.png

Last screen and creation of assets

You need to add the new rounded icons to the respective roundIcon option on the AndroidManifest.xml

...

android:icon="@mipmap/ic_launcher"

android:roundIcon="@mipmap/ic_launcher_round"

...>

After apply the changes. The app icon will look according to the the guidelines of android for adaptive icons.

8ea161641fc782ceca06594ba6f1a829.png

Example: Android 9, API 28 stock launcher

f0a5b87c320a03097939f8aaa0cd39be.png

Example: Android 7.0, API 24, Smart Launcher

????

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值