Adaptive Icons (Android 8.0)

Adaptive icons are introduced in Android 8.0 (API level 26). In this new API level, the launcher icons can be displayed in a variety of shapes like circular, square etc. For example – according to icons type selected, your app’s launcher icon can be circular in one device and square in another device. Actually, the device provides a mask which is used to show the icons in different sizes.

Let us learn about creating Adaptive icons that fit in all the shapes and sizes.

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.

According to Android Developers documentation, the rules for creating the two layers are

To create an Adaptive icon you can follow the below given steps.

  1. Define the “icon” attribute in the application tag in your AndroidManifest.xml to specify a drawable resource.
  2. Create an ic_launcher.xml in your mipmap folder. The file should look like this

Adaptive icons are also animated according to the supported launchers. If you are still using legacy icons then the icon doesn’t look consistent with other icons that the system UI displays, and doesn’t support visual effects.

That’s all, create your own Adaptive icons to support the latest version of Android.

Thank you very much. This is Vedesh Kumar signing off.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close