From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use XML-based VectorDrawable images

Use XML-based VectorDrawable images - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Use XML-based VectorDrawable images

- [Instructor] Android 5 introduced a new image format named Vector Drawables. It's an XML-based format similar to SVG. And in fact, Android Studio is able to convert many conventional SVG files to the vector drawable format. Now before I show you this, I should say that this doesn't work with all SVG files. Some SVG files simply don't have the right format for Android to be able to understand it and others have too much detail and can overload memory in an Android app. So if you want to try this, tread carefully and experiment. If you're successful converting your file to a vector drawable, test it on multiple physical devices with larger and smaller amounts of memory to make sure it's going to work for you. Now to experiment with this, I'm providing a few different files. I'm in my project scope. I'll go to my course assets directory. And here are some SVG files that were created by a graphic designer in Illustrator. To convert this file, I'll go to my app module and right-click…

Contents