Menu Item icon getting overlapped in API 23
<p>I was creating a cart menu icon with Badge and layler-list but I found that on API 23 the menu icon is getting unwanted background.</p>

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

<p><strong>activity_menu.xml</strong></p>

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


    &lt;item
        android:id="@+id/action_cart1"
        android:icon="@drawable/ic_menu_cart"
        android:title="Cart"
        app:showAsAction="always" /&gt;
&lt;/menu&gt;
</code></pre>

<p><strong>ic_menu_cart.xml</strong>  </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:drawable="@drawable/cart"
        android:gravity="center" /&gt;

    &lt;!-- set a place holder Drawable so android:drawable isn't null --&gt;
    &lt;item
        android:id="@+id/ic_badge"
        android:drawable="@drawable/cart" /&gt;
&lt;/layer-list&gt;
</code></pre>

<p>below is the code to update the cart count.</p>

<pre><code>  public static void setBadgeCount(Context context, LayerDrawable icon, String count) {

        BadgeDrawable badge;

        // Reuse drawable if possible
        Drawable reuse = icon.findDrawableByLayerId(R.id.ic_badge);
        if (reuse != null &amp;&amp; reuse instanceof BadgeDrawable) {
            badge = (BadgeDrawable) reuse;
        } else {
            badge = new BadgeDrawable(context);
        }

        badge.setCount(count);
        icon.mutate();
        icon.setDrawableByLayerId(R.id.ic_badge, badge);
    }
</code></pre>

<p>I have created the the xml for different API's, but didn't work.
I want to remove the background.
Kindly help!!</p>