title: Change text color in shape on touch of button
body: <p>How to change color text in button when the user touches this button?</p>
  
  <p>Here is my shape.xml code:</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 android:shape="rectangle"&gt;
    &lt;gradient android:startColor="#ffcc33" 
      android:endColor="#ffcc33"
      android:angle="270" /&gt;
    &lt;corners android:radius="4dp" /&gt;
    &lt;stroke android:width="2px" android:color="#FFFFFF" /&gt;
  &lt;/shape&gt;
  &lt;/item&gt;
  
    &lt;item android:state_focused="true" &gt;
  &lt;shape android:shape="rectangle"&gt;
    &lt;gradient android:startColor="#ffcc33" 
      android:endColor="#ffcc33"
      android:angle="270" /&gt;
    &lt;corners android:radius="4dp" /&gt;
    &lt;stroke android:width="2px" android:color="#FFFFFF" /&gt;
  &lt;/shape&gt;
  &lt;/item&gt;
  
    &lt;item &gt;
  &lt;shape android:shape="rectangle"&gt;
    &lt;gradient android:startColor="#333333" 
      android:endColor="#333333"
      android:angle="270" /&gt;
    &lt;corners android:radius="4dp" /&gt;
    &lt;stroke android:width="2px" android:color="#FFFFFF" /&gt;
  &lt;/shape&gt;
  &lt;/item&gt;
  
  &lt;/selector&gt;
  </code></pre>