| Start | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| VectorDrawable Usage Example Here’s an example vector asset which we’re actually using in AppCompat: res/drawable/ic_search.xml Using this drawable, an example You can also set it at run-time: The same attribute and calls work for |
||||||||||
| VectorDrawable xml example Here is a simple |
||||||||||
| Importing SVG file as VectorDrawable You can import an SVG file as a "Right-click" on the Select the Local File option and browse to your .svg file. Change the options to your liking and hit next. Done. Parameters
RemarksUpdate build.gradle file. If you are using v2.0 or above of the Gradle plugin, then add following code. If you are using v1.5 or below of the Gradle plugin, then add following code. Read Android Support Library 23.2 Release Notes (opens new window) for more info. NOTE : Even with AppCompat, Vector Drawables wont work outside of your app in older android versions. For instance, you cannot pass vector drawables as Notification icons as they are handled by the system and not the app. See this answer (opens new window) for a workaround. |
Read Article
https://develop.horje.com/learn/1434/reference