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

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

    Another way to solve this is using Unicode:

    1. set your text in your xml to

      android:text="@string/myNameHere"

    2. In strings xml add the following line:

      bakeries \u0026 desserts

    voilá!

提交回复
热议问题