FrinkTheBrave
FrinkTheBrave

Reputation: 3958

Specifying special/reserved characters in android textview xml

Hallo,

Anyone know how to specify 'special' or 'reserved' characters for a TextView object in the xml?

What I want to display in my text view is ?/? so I put:

android:text="?/?"

but although this displays correctly in the eclipse 'Graphical Layout' of the xml file, it gives an error:

error: Error: No resource found that matches the given name (at 'text' with value '?/?')

I've tried using:

"?/?"

but the error is the same.

TIA,

Upvotes: 0

Views: 1471

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69198

Escape the '?':

android:text="\?/\?"

Upvotes: 2

Related Questions