I am using Android Studio 2.0 and am targeting SDK verion 21 which supports vector images.
I add the .svg file from New->Vector Asset and it generates a drawable from it (.xml).
The problem is that when i change the .svg (in a vector graphics editor) then the .xml is not automatically updated inside the Studio. How to make it automatically update the generated .xml files if the .svg changes?
Regards!
Android Studio includes a tool called Vector Asset Studio that helps you add material icons and import Scalable Vector Graphic (SVG) and Adobe Photoshop Document (PSD) files into your project as vector drawable resources.
@Apurva its not always true.In new version of android studio if you import a launcher icon via image asset then it will go in res/mipmap instead.
android:viewportHeight. Used to define the height of the viewport space. Viewport is basically the virtual canvas where the paths are drawn on.
The answer is: you can!!
And it is very easy! Just click right button on folder(drawable for ex.) and choose:
then choose:
and your got it!
(There are some restrictions: https://developer.android.com/studio/write/vector-asset-studio.html#PSD)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With