Android How to Remove white space / padding around vector asset in ImageView?

Viewed 557

I would like to remove the white space around my vector assets , I'm not sure how to do that. My files do not have any white space around them. The issue ( I would like it to be like the red border I drew in paint): enter image description here

This is one of my files:

enter image description here

1 Answers

You can use android:scaleType="centerCrop" property with your ImageView make sure you are using android:src="@drawable/xyz" to set your drawable not android:background="@drawable/xyz" in order for this to work.

Related