O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Vector drawables

The vector studio allows us to import SVG files and convert them into VectorDrawables. There are many ways to obtain vector graphics, and many graphic editors can convert from other formats. There are also some very good online tools to convert other formats to SVG:

image.online-convert.com/convert-to-svg

And JetBrains plugin is also available from:

plugins.jetbrains.com/plugin/8103-svg2vectordrawable

It is unlikely that you will do much when you write your own SVG objects, but it is useful to see how the process operates, as these steps demonstrate:

  1. Save the following code as a .svg file:
<svg     height="210"     width="210">  <polygon     points="100,10 40,198 190,78 10,78 160,198"     style="fill:black;fill-rule:nonzero;"/>  

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required