title: Setting TextView color to a <selector> programmatically
body: <p>I have the following selector defined in an XML file under <em>res/color/redeemlist_item_color.xml</em>:</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"
              android:color="#FFFFFF" /&gt; &lt;!-- pressed --&gt;
  
        &lt;item android:state_selected="true"
              android:color="#FFFFFF" /&gt; &lt;!-- focused --&gt;
  
        &lt;item android:color="#000000" /&gt; &lt;!-- default --&gt;
  
     &lt;/selector&gt;
  </code></pre>
  
  <p>I also have a <code>TextView</code> in a <code>ListView</code> item layout. When I set <code>android:textColor</code> on this <code>TextView</code> to the above selector in XML, then the color changes correctly when the item is selected. However, I am trying to set this resource programmatically in the following way:</p>
  
  <pre><code>holder.label.setTextColor(R.color.redeemlist_item_color);
  </code></pre>
  
  <p>When set in this way, the color no longer changes. Can a selector be assigned to a <code>TextView</code> in this way?</p>