Posts

Showing posts with the label SVG

Android Working with SVG/Vector Drawables

Image
In this tutorial I will guide you on How to import Vector Assets and Drawables in your Android application. I will also cover how to give support for devices which do not support vector assets using AppCompat library. Importing Vector Asset using Android Studio In case of Vector Assets You do not directly copy paste your icons and images in drawable folder. There is tool in Android Studio for importing Vector Assest or Scalable Vector Graphics (SVG). Go to File => New => and select Vector Asset. Importing Vector Assets (SVG) Android Studio You can also enable RTL (Right to Left) support. When your application will be running in RTL mode, your SVG icon will be flipped automatically. After this step SVG file which you imported above will be converted into XML file. Vector Drawable XML Preview At this step we are ready to use above icon in our application but there is a lot more to do. Backward Compatibility for SVG Vector Drawables or Scalable Vector Graphi...