![]() ![]() The foreground image can contain transparency but the background image should not. Generating Adaptive IconsĪdaptive icons use a foreground image and a background image or colour to create the icon. You must only use the android:roundIcon attribute if you require a different icon asset for circular masks, if for example the branding of your logo relies on a circular shape. ![]() Note: You should still package icons using the existing method in AIR (in the application descriptor) in order to correctly support older versions of Android that do not support adaptive icons (< v26)!Īdditionally if you want to enable “round” icons you need to add the android:roundIcon tag to your application node in the manifest additions: There is no changes to the code of your application required, only the need to generate and package additional resources. Packaging these resources with your application.Creating or generating the adaptive icon resources.There are two steps to adding adaptive icons to your application: The icon on the right implements the adaptive icons approach contained here. By adding adaptive icons we can make our AIR application a first class citzen with an icon that adapts with the OS. You will most likely see your icon surrounded by a white area as in the icon on the left below. You must provide icon layers as drawables without masks or background shadows around the outline of the icon.Ĭurrently AIR does not generate adaptive icons automatically. ![]() You can control the look of your adaptive launcher icon by defining 2 layers, consisting of a background and a foreground. Adaptive launcher icons are also used in shortcuts, the Settings app, sharing dialogs, and the overview screen. Each device OEM provides a mask, which the system then uses to render all adaptive icons with the same shape. For example, an adaptive launcher icon can display a circular shape on one OEM device, and display a squircle on another device. See the latest version of this tutorial here Android Adaptive IconsĪndroid 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models. ![]()
0 Comments
Leave a Reply. |