title: Android XML drawable rounded corners with bitmap tag
body: <p>I have next XML drawable blue_button</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item&gt;
      &lt;layer-list&gt;
        &lt;item&gt;&lt;bitmap android:src="@drawable/button_blue_bg" /&gt;
        &lt;/item&gt;
        &lt;item &gt;
           &lt;shape&gt;
                  &lt;corners android:radius="50dip" /&gt;
                  &lt;stroke android:width="1dip" android:color="#ccffffff" /&gt;
                  &lt;solid android:color="#00000000" /&gt;
                  &lt;padding android:bottom="3dip" 
                           android:left="3dip"
                           android:right="3dip"
                           android:top="3dip" /&gt;
           &lt;/shape&gt;
         &lt;/item&gt;
       &lt;/layer-list&gt;
    &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>And i have image button_blue_bg with gradient with 1px width.</p>
  
  <p>When i set button background i get next image</p>
  
  <p><img src="https://i.stack.imgur.com/xUtWn.png" alt="enter image description here"></p>
  
  <p>As you can see i have background not clipped with rounded border.</p>
  
  <p>How i need modificate xml for background gradient image be not outside border?</p>
  
  <p>I understand why it happended, because i use layers - so this like sandwich- but i also programming on objective c, and there it's also use layers. But in Apple it's wotks fine.</p>