How to have “&” i.e and symbol in Android TextView

后端 未结 8 568
半阙折子戏
半阙折子戏 2020-12-24 11:51

I want to have some simple text in textView..

Like...(android & java)

means I exactly require \"and\" symbol in textView

If I\'m pro

8条回答
  •  没有蜡笔的小新
    2020-12-24 12:27

    The layout files are just xml and the & symbol is not allowed by itself.

    You will need to use & instead

    http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML

提交回复
热议问题