In this article, I will show you how to create the Android application icon with Assets Studio in Android Studio. If you right-click over pretty much any directory in the Android Studio tree, the context menu will have an “Image Asset” option.
By default, the Asset Studio has its “Icon Type” drop-down set for “Launcher Icons(Adaptive and Legacy)”, “Lancher Icons(Legacy Only)”, “Action Bar and Tab Icons” and “Notification Icon”. The overall name for launcher icon is found in the Name field, above the tabs. The default is ic_launcher.
Create adaptive and legacy launcher icons
Note: If your app supports versions no higher than Android 7.1, follow the instructions to create a legacy launcher icon only instead.
After you open Image Asset Studio, you can add adaptive and legacy icons by following these steps:
- In the Icon Type field, select Launcher Icons (Adaptive & Legacy).
- In the Foreground Layer tab, select an Asset Type, and then specify the asset in the field underneath:
- Select Image to specify the path for an image file.
- Select Clip Art to specify an image from the material design icon set.
- Select Text to specify a text string and select a font.
- In the Background Layer tab, select an Asset Type, and then specify the asset in the field underneath. You can either select a color or specify an image to use as the background layer.
- In the Legacy tab, review the default settings and confirm you want to generate legacy, round, and Google Play Store icons.
- Optionally change the name and display settings for each of the Foreground Layer and Background Layer tabs:
- Name – If you don’t want to use the default name, type a new name. If that resource name already exists in the project, as indicated by an error at the bottom of the wizard, it’s overwritten. The name can contain lowercase characters, underscores, and digits only.
- Trim – To adjust the margin between the icon graphic and border in the source asset, select Yes. This operation removes transparent space, while preserving the aspect ratio. To leave the source asset unchanged, select No.
- Color – To change the color for a Clip Art or Text icon, click the field. In the Select Color dialog, specify a color and then click Choose. The new value appears in the field.
- Resize – Use the slider to specify a scaling factor in percent to resize an Image, Clip Art, or Text icon. This control is disabled for the background layer when you specify a Color asset type.
- Click Next.
- Optionally, change the resource directory: Select the resource source set where you want to add the image asset: src/main/res, src/debug/res, src/release/res, or a custom source set.
- Click Finish. Image Asset Studio adds the images to the mipmap folders for the different densities.(Note Above description is taken from android studio documentation)
See below figure where I create a Text icon using Assets Studio.
NOTE: Same way we can create legacy launcher icon ,Action bar and tab icons and Notification icons.