title: Android selector with background image and gradient
body: <p>I know there are similar post to this but I couldn't find my answer in any of them. So, I have this drawable XML:</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="true"&gt;
      &lt;bitmap
          android:src="@drawable/bm_btn_background"
          android:tileMode="repeat"
          android:gravity="center" /&gt;
  &lt;/item&gt;
  &lt;item android:state_enabled="true"&gt;
      &lt;shape android:shape="rectangle"&gt;
          &lt;gradient
              android:startColor="#a0e0b071"
              android:endColor="#a0a67637"
              android:angle="270" /&gt;
          &lt;stroke
              android:width="1dp"
              android:color="#5c3708" /&gt;
          &lt;corners
              android:radius="5dp" /&gt;
          &lt;padding
              android:left="10dp"
              android:top="10dp"
              android:right="10dp"
              android:bottom="10dp" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  &lt;item android:state_pressed="true" &gt;
      &lt;shape&gt;
          &lt;gradient
              android:startColor="#a0a67637"
              android:endColor="#a0e0b071"
              android:angle="270" /&gt;
          &lt;stroke
              android:width="1dp"
              android:color="#5c3708" /&gt;
          &lt;corners
              android:radius="5dp" /&gt;
          &lt;padding
              android:left="10dp"
              android:top="10dp"
              android:right="10dp"
              android:bottom="10dp" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am trying to create a button with a repeated image as background and a gradient applied to it. With this code I only see the background image, not the gradient nor the border and the rounded corners. Also, when I click the button, it doesn't change (the gradient is supposed to change). I don't know what is wrong with this code? If instead of a selector I use a layer-list, I get the desired result but it doesn't change either when I press the button. Thanks for your help!</p>