Search code examples
androidsvgvectorandroid-vectordrawable

Convert my current project icons to the Vector Drawables in Android?


I'm new to the Android Vector Drawables which was introduced in the API level 21. I'd like to know that how can I convert my existing project icons which are in the PNG format, into the SVG file (Vector Drawables)?


Solution

  • If you are using default Android icons, you can right click on the "drawables" folder in your project and go to: New > Vector Asset. Here you can search all the android icons and add the vector assets (in whatever size) to your project.

    If you are using custom icons, you can usually export them as svg's from your editing software. If not, you can google for icon to svg/vector drawable converters.

    You can use the vector drawables the same way you would any normal drawable.