0

I have buttons that write into a textview. I want to write "?", but it's not allowed in strings.xml. So, I want the button to have different value (which is written to the textview) than the text in the button. How can I do this? Thanks in advance.

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
Tamas Koos
  • 1,053
  • 3
  • 15
  • 35

2 Answers2

3

Use

<string name="question">\?</string>

to escape the question mark.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
0

Also , you can try Html.fromHtml programmatically. Following link discusses that. android-TextView setText in Html.fromHtml to display image and text

Thanks JRH

Community
  • 1
  • 1
jrh
  • 764
  • 13
  • 31