Android ImageView has unwanted padding: layout troubleshooting

If you use ImageView in your android app layout and you get that unwanted padding around the image, here’s an Android XML attribute that helped me solved the layout issue:

Add android:adjustViewBounds=”true” attribute to your ImageView XML tag and you’ll probably see the unwanted padding go away. According to the ImageView docs: android:adjustViewBounds Set […]

Read More