Icons: An integral part of an android app

A Developer 😀
3 min readMay 7, 2020

There are always two things scarce to the android app developer time for development and visual property on the screen. It’s a well-known fact that the app can’t convey every message to a user in words on a mobile screen due to the small display property area. Then I remembered one famous quote from the past

A picture is worth a thousand words

Icons give the user an idea about the importance and functionality at the specific stage or action that the app wants to convey. Icons in android development are treated as resources. There are two types of icon assets in android:

  • Image Asset helps you create various types of icons with different densities and shows you exactly where they’ll be placed in your project. It includes tools for adjusting your icons and adding backdrops, all while displaying the result in a preview pane, so they appear exactly as you intended.
  • Vector Asset adds a vector graphic to the project as an XML file that defines the image. Maintaining an XML file is much easier than updating multiple images of various resolutions.

Adding icons to the android app

  • This article assumes that you have a pre-existing android project.
  • Navigate to the project explorer, open the context menu of either res or drawable folder. From the menu select a new item followed by vector asset to open Asset studio.
Select vector asset
Vector asset studio
  • In the vector asset studio asset type can be selected by clicking the icon in front of clip art. A modal dialog will open containing all and categorized listing of material icons.
Categorized icon selector
  • Select the desired icon and then click ok. After selection, you will be redirected to the asset studio dialog. Here vector assets can be customized for size, color, and mirroring. After giving a meaningful name to the icon and click next.
  • A confirmation modal dialog will open stating the full path where the vector asset will be added as a tree structure.
Vector asset confirmation dialog
  • Click finish. The asset will then be added under the drawable folder.
Project view with asset added
  • Congratulations, you have successfully added the vector asset to the android project. Select the newly added file name the icon will appear in the preview pane on the right-hand side in the Android Studio.
Thanks :)

Happy Coding :)

--

--

A Developer 😀

Reader | Traveller | Freelancer | Android & Fullstack Developer | Open-Source Enthusiast | Loves Automation