Thursday, March 15, 2012

String resources with font color

To have a TextView show a string resource with colors use a "font" tag with attribute fgcolor, NOT color:

<resources>
  <string name="some_text">this is <font fgcolor="#ffff0000">red</font></string>
</resources>

Source: http://tumble.mlcastle.net/post/17700903735/html-like-tags-in-android-string-resources