开发者

Specifying special/reserved characters in android textview xml

开发者 https://www.devze.com 2023-02-03 11:24 出处:网络
Hallo, Anyone know how to specify \'special\' or \'reserved\' characters for a TextView object in the 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:

"&a开发者_开发问答mp;#63;/?"

but the error is the same.

TIA,

  • Frink


Escape the '?':

android:text="\?/\?"
0

精彩评论

暂无评论...
验证码 换一张
取 消