I'm wondering how vector drawing in Android with the Shape
class may resemble another vector drawing standard.
Since Shape
is a Drawable
, and Drawables are usually defined as XML, it sounds a lot like the vector drawing commands in SVG.
My question is this: Has anybody created an XSLT transformation, or other mechanism, for converting an SVG drawing description into Android Shapes?
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.
Sometimes you want an outline around your shape and to do that you can use the stroke tag. You can specify the width and color of the outline using android:width and android:color. Since your shape is a rectangle, you can round rectangle's corners. You can do that inside of the corners tag.
@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.
Another non-GPL'd library (this one is Apache License 2.0), the one used in Google's Androidify app: svg-android
https://github.com/pents90/svg-android
Well, not exactly. But I do have ported libsvg to android, which enables you to load SVG files and plot them to a Canvas.
Please check out:
https://launchpad.net/libsvg-android
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