ImageView extra padding issue
<p>ImageView code :</p>

<pre><code>&lt;ImageView
    android:layout_width="wrap_content"
    android:layout_height="?actionBarSize"
    android:contentDescription="@string/logo"
    android:layout_margin="@dimen/view_padding"
    android:padding="@dimen/view_padding"
    android:src="@drawable/home_logo"
    android:adjustViewBounds="true" /&gt;
</code></pre>

<p>API 17 and below : (The problem)</p>

<p><a href="https://i.stack.imgur.com/qSEsg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qSEsg.png" alt="enter image description here"></a></p>

<p>API 18 and above : (Desired result)</p>

<p><a href="https://i.stack.imgur.com/C1aoR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C1aoR.png" alt="enter image description here"></a></p>

<p>As you can see there is extra padding on left and right in the problem image, where in desired result its not there. Also I don't want to stretch the image and not even change the height.</p>

<p>PS: These blue boundaries are of "showLayoutBounds" option in developer settings.</p>