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

9 comments:

Anonymous said...

Not working.

Anonymous said...

Oh, sorry.

It actually works. I forgot the extra ff in the color.

Anonymous said...

It is working thank u bro

Elizabeth J. Neal said...

And as any suburbanite who has had a peaceful barbecue interrupted by the whine of a small engine can tell you, the tool to finish the job is the string trimmer. weed wacker reviews 2016

jowdjbrown said...

New site is solid. A debt of gratitude is in order for the colossal exertion.
二重

Gamer said...

I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. 9apps download

Ali Khan said...

I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You upload to instagram from pc

Ali Khan said...

Its really awesome to see these kind of posts which is really helpful for the people. Keep up the awesome work buddy instagram online

Ali Khan said...

Very informative post thanks for share this with us i highly appreciate you for this information thanks once again for sharing information like this Very informative post Thanks for sharing with you. instagram online viewer