Monday, May 2, 2016

Use Android Studio's Image Asset to conveniently create Android action bar menu icons from Clipart symbols

I found Android Studio's Asset Studio to be a great help in creating standard Android drawable action bar and tab menu icons e.g. Share, Search, etc . Previously, I had to search for the standard icons under the Android platform sources and manually copy them into my Android project; which is a pain as there are multiple copies of the same icon for different resolutions. The Asset Studio will create the same icon at different resolutions for you in your project from a pre-defined clip art library. The following steps illustrate how easy it is.

  1. In Android Studio, open up a project e.g. MyApplication. Mouse right click on the project's drawable folder.

    A pop up menu appears.

  2. Choose New | Image Asset.

    The Asset Studio appears.

  3. In the Asset Type field, choose Action Bar and Tab Icons. Toggle on Clipart.


  4. Click Choose.

    Clip art symbols appear.
  5. Click on a symbol.

    The chosen symbol is displayed in the Preview column at different resolutions.

  6.  In the Resource name field, type in the desired name, e.g. ic_action_exclamation.
  7. Click Next.


  8. Click Finish.

    The drawable icons are created
    .


No comments: