Multiple strokes with spacing
<p>I want to have a button style with two strokes with some spacing between them. My first approach is not satisfying because in the corners the spacing between the strokes is different:</p>

<p><img src="https://i.stack.imgur.com/HKjMQ.png" alt=""></p>

<p>The gray stroke should be tight around the blue gradient and the corner radius of the white stroke should fit to the others.</p>

<p>Here's my code:</p>

<pre class="lang-xml prettyprint-override"><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 &gt;
        &lt;shape android:shape="rectangle"&gt;

            &lt;padding android:left="2dp"
                android:top="2dp"
                android:right="2dp"
                android:bottom="2dp"/&gt;

            &lt;stroke
                android:width="1dp"
                android:color="#7F7F7F"/&gt;

            &lt;corners
                android:radius="6dp"/&gt;
        &lt;/shape&gt;
    &lt;/item&gt;

    &lt;item &gt;
        &lt;shape android:shape="rectangle"&gt;
            &lt;padding android:left="2dp"
                android:top="2dp"
                android:right="2dp"
                android:bottom="2dp"/&gt;

            &lt;gradient
                android:startColor="@color/colorBlueLight"
                android:endColor="@color/colorBlueDark"
                android:angle="270"/&gt;

            &lt;corners
                android:radius="6dp" /&gt;
        &lt;/shape&gt;
    &lt;/item&gt;

    &lt;item &gt;
        &lt;shape android:shape="rectangle"&gt;

            &lt;padding android:left="2dp"
                android:top="2dp"
                android:right="2dp"
                android:bottom="2dp"/&gt;

            &lt;stroke
                android:width="2dp"
                android:color="#FFFFFF"/&gt;

            &lt;corners
                android:radius="6dp"/&gt;
        &lt;/shape&gt;
    &lt;/item&gt;

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