Unwanted padding around an ImageView
finally!
<ImageView
(...)
android:adjustViewBounds="true" />
the adjustViewbounds attribute did the trick:
Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
i stumbled upon it here. thanks for your help!
those extra padding is autogenerated since the android would try to get the original aspect ratio. please try below
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_height="wrap_content"
android:scaleType="fitXY"
It works for me.