I need help understanding some of the properties of VectorDrawable that is defined by XML.
When i import a new vector asset using Android Studio, It generates something like:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#000000"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z" />
</vector>
By default the width, height, viewportHeight and viewportWidth are being set to some default Material design value.
Since we are dealing with vectors and not pixel images. My questions are:
Adding @dimen in xml vector gives error Error:Error: Width (0) and height (0) cannot be <= 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With