Android - How to make the XML file for a icon? Android - How to make the XML file for a icon? xml xml

Android - How to make the XML file for a icon?


If you're using an up to date version of Android Studio then right click on your drawable folder.Go to New > Vector Asset. This opens the Vector Asset Studio.

From here you can either select from a wide range of provided Material Design icons, or import your own svg if you want to.(importing an svg might not work properly in all cases)


Android Assets studio is not an "All in One" option as it misses many basic icons like that of google, LinkedIn etc even in the new version Android Studio, so for missing icons, a simple way would be to first download your desired image in SVG format, then go to drawable>New>Vector Asset and select Local file(SVG, PSD), locate your SVG File and click Next>Finish.

Now that file is converted into an XML File, very easy, you can now change its colors/size also in code of XML.


The Easier Way would be to right click on drawable -> New-> Vector Image Asset then download your desired Icon, After Downloading open the xml file and change the color to white.YOU MIGHT WANT TO RENAME FROM BLACK