title: TextView: unable to change text color at runtime
body: <p>This is my first post here.
  I've to change a <code>TextView's</code> text color at runtime. There's a method <code>TextView.setTextColor(int)</code>, but it doesn't work with int values that are not in resources. <br><br><strong>For example,</strong> a color calculated at runtime such as <code>0xFF0000 (RGB)</code>, not present in <code>R.color</code>, doesn't work. The <code>TextView</code> is not rendered.<br>
  I've taken a look at android source code for this, and there are two methods, none of them accept <code>rgb int values</code> as argument:</p>
  
  <pre><code>/**
   * Sets the text color for all the states (normal, selected,
   * focused) to be this color.
   *
   * @attr ref android.R.styleable#TextView_textColor
   */
  @android.view.RemotableViewMethod
  public void setTextColor(int color) {
      mTextColor = ColorStateList.valueOf(color);
      updateTextColors();
  }
  
  /**
   * Sets the text color.
   *
   * @attr ref android.R.styleable#TextView_textColor
   */
  public void setTextColor(ColorStateList colors) {
      if (colors == null) {
          throw new NullPointerException();
      }
  
      mTextColor = colors;
      updateTextColors();
  }
  </code></pre>
  
  <p><strong>So there's no way of doing this? Maybe extending <code>TextView</code>?</strong></p>
  
  <p>Thanks in advance.</p>