What is the best way to add icons to Android Stutio at the moment?
I heard that Google recommends switching to vector icons. No problem, just a couple more questions:
- How best to add them? Via Vector Accet?
- Which folder is best stored in?
What is the best way to add icons to Android Stutio at the moment?
I heard that Google recommends switching to vector icons. No problem, just a couple more questions:
Icons are just small pictures that are in the res / drawable / project folder. The way they get there doesn’t matter at all and is not accompanied by any particular ritual.
For vector icons you can:
through any file manager, drop into the project folder / res / drawable / any previously prepared icons in the VectorDrawable format
Select the desired icons in any file manager and select Copy in the context menu. Then in Android Studio select the Drawable folder and select Paste in the context menu. A dialog box with a choice of a specific destination folder (with qualifiers) will be offered, in the case of vector icons a folder without qualifiers is usually required.
Through the Vector Drawable Imporner tool, select one icon from the pre-installed pack
transform the Vector Assets tool into the VectorDrawable format from the SVG or PSD format to create your own icon or, again, choose one icon from a pre-installed package.
the rest of the tools in this series are used for raster images, and here Android Studio tools are more appropriate , as they allow you to automatically convert icons to the required permissions and scatter them into the appropriate folders. Learn more about the Drawable Importer plugin, which uses Android Studio to import icons.
As you can see, the first method allows you to add a lot of icons at once by simple copying, the second allows you to quickly scatter the pack into folders with qualifiers if it is a raster icon, the third is more visual and does not require your own icons, but slower if more than one icon is needed or it is completely unsuitable for importing your own icons, the fourth one converts from SVG (this type of vector graphics is not supported by Android), which actually makes it possible to add your own icons to bottom.
The way in which you add the icons exactly depends on your preferences and not on the development experience.
Source: https://ru.stackoverflow.com/questions/562342/
All Articles