How to Import Set of Icons into Android Studio Project

How to import set of icons into Android Studio project


Edit :
After Android Studios 1.5 android support Vector Asset Studio.


Follow this, which says:

To start Vector Asset Studio:

  1. In Android Studio, open an Android app project.
  2. In the Project window, select the Android view.
  3. Right-click the res folder and select New > Vector Asset.

Sample Image


Old Answer

Go to Settings > Plugin > Browse Repository > Search Android Drawable Import

This plugin consists of 4 main features.

  1. AndroidIcons Drawable Import
  2. Material Icons Drawable Import
  3. Scaled Drawable
  4. Multisource-Drawable

How to Use Material Icons Drawable Import : (Android Studio 1.2)

  • Go to File > Setting > Other Settings > Android Drawable Import

Sample Image

  • Download Material Icon and select your downloaded path.

Sample Image

  • Now right click on project , New > Material Icon Import

Sample Image

  • Use your favorite drawable in your project.

Sample Image

How do I import a custom made icon in Android Studio?

right click on res folder, selecting New > Image Asset. browse image file,
should do the job for you

Import material design icons into an android project

Take a look at Vector Asset Studio

Follow these steps to start Vector Asset Studio:

  • In Android Studio, open an Android app project.
  • In the Project window, select the Android view.
  • Right-click the res folder and select New > Vector Asset.

After you open Vector Asset Studio, you can add a material icon as follows:

  • Select "Material Icon" (by clicking on the Clip Art: ICON)
  • Click Choose
  • Select a material icon

Is there a built-in method to add drawable that is not an icon using Android Studio?

Unfortunately after posting and creating a bounty, I found that it was already asked as Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image?

Therefore Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image? has some useful options quoted below:

Option #1: Just ship the -xxhdpi drawables and let Android downsample them for you at runtime (downside: will only work on fairly recent devices, where -xxhdpi is known).

Option #2: Automate the process within a graphics editor, per ssantos' answer.

Option #3: Script yourself a solution, using something like ImageMagick

(answers by CommonsWare)

I followed option #3

Fast ways to import drawables in Android Studio?

This became a lot easier since Android Studio 3.4.
Simply go to the Resource Manager-tab and click the little add-button add resources to the module.
[add button within resource manager[1]

Then select the drawables you would like to import.
If you placed the drawables in folders with the same name like the qualifiers (drawable-mdpi, drawable-hdpi. drawable-xhdpi and so on), the tool will automatically know were to add them.
drawables import dialog

The only thing still missing in my opinion is adding the drawables to a certain flavorDimension.



Related Topics



Leave a reply



Submit