title: Change clickable TextView's color on focus and click?
body: <p>I have a clickable TextView that I want to give some colors to. But I don't know how. Here are the relevant code snippets from my two files that I'm working with:</p>
  
  <pre><code>TextView title = new TextView(this);
  title.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
  title.setTextColor(R.color.textcolor);
  title.setText(titleLine);
  title.setTypeface(null, Typeface.BOLD);
  title.setClickable(true);
  title.setId(idLine);
  title.setFocusable(true);
  
  title.setOnClickListener(new View.OnClickListener() {
  
      @Override
      public void onClick(View v) {
  
                  /* Irrelevant code */                   
  
      }
  });
  </code></pre>
  
  <p>And this is my textcolor.xml file:</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="#000000"/&gt; &lt;!-- pressed --&gt;
      &lt;item android:state_focused="true"
            android:color="#000000"/&gt; &lt;!-- focused --&gt;
      &lt;item android:color="#000000"/&gt; &lt;!-- default --&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>When I use the textcolor-file by typing <em>title.setTextColor(R.color.textcolor);</em>, the textcolor just becomes grey, regardless if I press it or so. Which is strange since I have written "#000000" in all color fields.<br>
  But if I remove the setTextColor code, gets the textView a light grey color, and when I press it, it becomes black. But that aren't the colors that I want.</p>
  
  <p>So, can anyone help me with this problem?</p>
  
  <p>Just to clarify: I want to be able to specify the colors for the text when it's normal, pressed and focused.</p>