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
  • 152,872
  • 27
  • 286
  • 297
Tamas Koos
  • 973
  • 3
  • 14
  • 35

2 Answers2

3

Use

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

to escape the question mark.

Diego Torres Milano
  • 61,192
  • 8
  • 106
  • 129
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
jrhamza
  • 714
  • 12
  • 29