Android - How to make the XML file for a icon?
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.
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)