Incorrect items sizing in layer-list on pre-lollipop : <p>I have a layer-list </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;

&lt;item android:right="2dp" android:left="2dp" android:bottom="2dp" android:top="2dp"&gt;
    &lt;bitmap
        android:gravity="center"
        android:src="@drawable/ic_menu_alert"/&gt;
&lt;/item&gt;

&lt;item android:height="10dp" android:width="10dp" android:gravity="right|top"&gt;
    &lt;shape android:shape="oval"&gt;
        &lt;size android:height="10dp" android:width="10dp"/&gt;
        &lt;solid android:color="@color/navigation_drawer_notification_red_color"/&gt;
    &lt;/shape&gt;
&lt;/item&gt;

&lt;/layer-list&gt;
</code></pre>

<p>which shows this image </p>

<p><a href="https://i.stack.imgur.com/erKWX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/erKWX.png" alt="image"></a></p>

<p>On lollipop and above everything is fine but on pre-lollipop red circle lose all sizing and padding attributes and image looks like this</p>

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

<p>I was looking for solution about 3 days and found nothing. I was trying to make my own toolbar layout and set to this imagebuuton scaleType="centerInside" but it didn't help. Could anyone help with this issue?</p>

<p>Thanks in advance!</p>
