title: Android button with shadow in drawable xml
body: <p>I'd like to create a drawable and use it as a backround for my buttons.
  The shadow's height must be 18dip. See the picture.</p>
  
  <p><a href="https://i.stack.imgur.com/EHi0S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EHi0S.png" alt="This should be described in drawable xml"></a></p>
  
  <p>I've tried it this way, but it's not working:</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 android:state_enabled="false"&gt;
          &lt;layer-list&gt;
              &lt;item android:gravity="bottom"&gt;
                  &lt;bitmap android:src="@drawable/shadow9path"/&gt; // This is a 9-path picture
              &lt;/item&gt;
              &lt;item android:gravity="bottom"
                    android:bottom="18dp"&gt;
                  &lt;shape android:shape="rectangle"&gt;
                      &lt;size android:height="@dimen/..." /&gt;
                      &lt;corners android:radius="@dimen/..." /&gt;
                      &lt;solid android:color="@color/..." /&gt;
                  &lt;/shape&gt;
              &lt;/item&gt;
          &lt;/layer-list&gt;
      &lt;/item&gt;
  ...
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong>
  The shadow should be only on the bottom of the button. So the button should not be rounded with the shadow. I need something like a compound view, which consists of the button and the shadow below it.</p>