android string.xml reading html tags problem

android, string

Solution

Use XML CDATA

<string name="demoStr"><Data><![CDATA[ <b>ABC</b> ]]> </Data></string>

getString() will be got `"<b>ABC</b>"`

Problem

In Android project's strings.xml file i have following html text ``` <?xml version="1.0" encoding="utf-8"?> <resources> <string name="myHeadStr"><b><u>bold, underline </u></b></string> ... </resources> ``` When i read this into getString(R.string.myHeadStr) it gives only text "bold, underline" it forgets the html tags and .... how to read complete string with html tags from string.xml

Original source

Related problems