5

I have two words inside TextView :

Hello world.

Now I want to colorize world to red color. How I can do that ONLY in XML itself without using java code (without using Html.fromHtml() as well)

Mike
  • 8,055
  • 1
  • 30
  • 44
Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119

1 Answers1

6

You can use font tag in string.xml as

<string name="hello">Hello <font fgcolor="red">World</font></string>
aastha gupta
  • 121
  • 1
  • 11