In my strings.xml file I have defined the following:
<string name="mystring"><b>Bold text</b>Non-bold text</string>
It should work, as it’s specified here. But actually only bold text is displayed, and the other part of text is gone.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
taken from this SO thread
use this
or from xml by this way
You CAN include raw HTML in strings.xml, as long as you wrap it in
Example:
Then, in your code:
you can also backslash-escape apostrophes/single-quotes inside the CDATA block, so you can have things like
<b>can\'t</b>instead of the infinitely-uglier<b>can't</b>