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

后端 未结 8 551
半阙折子戏
半阙折子戏 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:23

    The layout file is an XML file and has certain restrictions on which characters may be used. However, you can use XML escape sequences to display characters which have special meaning to XML. In this case, replace the "Bakeries & Dessert" with the string "Bakeries & Dessert" and you should get the behaviour that you require.

提交回复
热议问题