Android Studio tip 2— Assets & Icons

Federico Palmieri
AndroidPub
Published in
3 min readJan 30, 2017

--

I’m back with the second post. Today I’m going to speak about assets, specifically icons.

Android Drawable Importer

As an Android developer, probably you have already imported a lot of icons in the drawable folder manually. Sometimes designers are clever enough to simplify your job giving you the assets already in the correct folder with the correct naming, some other times you had probably to rename and manually move each PNG in the related drawable folder. This is time-consuming and also very frustrating. I would very much like to spend that time doing something else. How can we improve it and stop wasting time?

This is where the plugin “Android Drawable Importer” will help you. It has 4 main features:

  • Batch Drawable Import
  • Icon Pack Drawable Importer
  • Vector Drawable Importer
  • Multisource-Drawable

Batch Drawable Import

This feature is very useful, as the name suggest, to import a batch of drawable. Let’s say you have 5 different icons and you have them only in one resolution, you can import them in one go given the source density. It also creates PNGs for the other drawable folders if you want to.

Icon Pack Drawable Importer

Icon Pack Drawable Importer allows you to import an icon from a pre-defined set where you can specify the size, color, format and dimension.

This is not been particular useful anymore since Android Studio integrated a feature called Image Asset Studio where you can do the same and more. For example, you can export text as an asset or you can manipulate a given image.

Vector Drawable Importer

Vector Drawable Importer enables you to import vectors from a given set. Android Studio has already integrated a similar tool called Vector Asset Studio. In addition, it allows you to also import vectors from a given SVG or PSD. I would suggest using the integrated tool instead of the plugin in this case.

Multisource-Drawable

Last but not least, Multisource-Drawable. You can import an asset specifying a different icon for each density. This can be very useful wherever you need to use different icon based on screen density or if you have the icon in different folders and you want to import all of them at once.

That’s all for this post. Let me know your thoughts in the comments!

--

--

Federico Palmieri
AndroidPub

Software engineer. Tech enthusiast, football fan, beer lover.