ivan ivan - 1 year ago 78
Android Question

How to change text background inside in xml

Let say I have next code in strings XML, which is working fine and text color become blue on output

<string name="hello_world">
<font color='blue'> Hello world!</font> here is my text with yellow background

Question - Is it possible to change text background for some worlds in similar way as above, directly inside in xml string ?

Final result:

enter image description here

Answer Source

Sure, Check this:

<string name="hello_world">
<font color='blue'> Hello world!</font><font color = 'black' bgcolor = 'yellow'> here is my text with yellow background</font>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download