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

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

    Try to set the text by code

    TextView tv = (TextView)findViewById(R.id.textview);
    tv.setText("input");
    

    using Html to encode/decode the text

    Html.fromHtml(string) 
    

提交回复
热议问题