title: How to set width of layer-list as a whole?
body: <p>How can I specify the width of an XML drawable when using a <code>layer-list</code>? I want the width of the drawable (as a whole) to be set to 20dp but I don't where/how to set this + the preview pane doesn't help that much either.</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&gt;
          &lt;shape&gt;
              &lt;solid android:color="@color/blue" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item android:left="8dp" android:right="8dp"&gt;
          &lt;shape&gt;
              &lt;solid android:color="#fff" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IG2z2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IG2z2.png" alt="enter image description here"></a></p>