Created
September 24, 2019 11:15
-
-
Save anilkumar416/8b037660b630d330bc7010adea0123f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to use vector images in android studio ? | |
1. In build.gradle (Module:app) | |
Inside the defaultConfig | |
add --> vectorDrawables.useSupportLibrary(true) | |
2.Add this field in the xml file | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
3.Now you can replace your src with srcCompact | |
app:srcCompat="@drawable/image_name" | |
Vector images are very small in size | |
They don't lose quality when you scale them |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment