title: Android customized button; changing text color
body: <p>I made a button that changes the background drawable on different states, this way:</p>
  <pre><code>&lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
       &lt;item android:state_pressed=&quot;true&quot; android:drawable=&quot;@drawable/btn_location_pressed&quot; /&gt; &lt;!-- pressed --&gt;
       &lt;item android:state_focused=&quot;true&quot; android:drawable=&quot;@drawable/btn_location_pressed&quot;/&gt; &lt;!-- focused --&gt;
       &lt;item android:drawable=&quot;@drawable/btn_location&quot;/&gt; &lt;!-- default --&gt;
  &lt;/selector&gt;
  </code></pre>
  <p>The problem here is that I'm also trying to change the textColor as I do with the drawable but I'm not being able to. I already tried android:textColor and android:color but the first doesn't work whilst the seconds changes my background.</p>
  <p>The next code is part of my layout. Regarding to the text color it only works for the normal state text color, thus not changing it to the white one while pressed</p>
  <pre><code>&lt;Button android:id=&quot;@+id/location_name&quot;
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:paddingTop=&quot;5dp&quot;
          android:background=&quot;@drawable/location&quot;          
          android:textSize=&quot;15sp&quot;
          android:textColor=&quot;@color/location_color&quot;
          android:textColorHighlight=&quot;#FFFFFF&quot;
     /&gt;
  </code></pre>
  <p>Has anybody got a clue?</p>