title: Android - How combining Shape drwable and text color different states for button?
body: <p>I have some troubles managing Android State List for a button. I specified some Shape drwable item for different states, but i also need to change textColor depending on the current state.</p>
  
  <p>My actual state list xml is:</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_pressed="true"&gt;
          &lt;shape&gt;
              &lt;gradient
                  android:startColor="@color/white"
                  android:endColor="@color/light_gray"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="3dp"
                  android:color="@color/classic_red1" /&gt;
              &lt;corners
                  android:radius="3dp" /&gt;
              &lt;padding
                  android:left="10dp"
                  android:top="10dp"
                  android:right="10dp"
                  android:bottom="10dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
      &lt;item&gt;
          &lt;shape&gt;
              &lt;gradient
                  android:startColor="@color/classic_red1"
                  android:endColor="@color/classic_red2"
                  android:angle="270" /&gt;
              &lt;stroke
                  android:width="2dp"
                  android:color="@color/white" /&gt;
              &lt;corners
                  android:radius="3dp" /&gt;
              &lt;padding
                  android:left="10dp"
                  android:top="10dp"
                  android:right="10dp"
                  android:bottom="10dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>I need also to change textColor based on these 2 states.
  Thanks in advance.</p>