VectorDrawable image becomes pixelated VectorDrawable image becomes pixelated xml xml

VectorDrawable image becomes pixelated


Adding android:scaleType="fitXY" to the image solved it for me.


Android supports SVG on API level 21 and higher. For API level 19, 20 it fallback to png generation. The SVG we had put in the app had a smaller size for these generations and hence you seem to get pixelated images on your screen. In my case increasing the

<vector android:height="70dp" android:width="70dp"

of the vector XML generated better png and it started to look better on older devices


For me the reason that caused vectors to be converted to png was android:fillType="evenodd" attribute in my vector drawable. When I removed all occurrences of this attribute in my drawable (thus the vector using the default nonzero fill type), next time the app was built everything was fine.