Updated 17 November 2017
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.
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
1 2 3 4 5 |
<application … android:icon="@mipmap/ic_launcher" …> </application> |
1 2 3 4 |
<adaptive-icon> <background android:drawable="@color/ic_background"/> <foreground android:drawable="@mipmap/ic_foreground"/> </adaptive-icon> |
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.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.