Special characters in a TextView

前端 未结 6 881
孤城傲影
孤城傲影 2020-12-09 20:35

I want to show the \"♫\" character in an Android TextView, but it shows [] instead.

This is my code:

txtCatname.setText(\"♫\");
         


        
6条回答
  •  萌比男神i
    2020-12-09 21:31

    If nothing else helps, you can either:

    1. use a custom font (e.g. http://www.tutorialspoint.com/android/android_custom_fonts.htm or Add custom font for complete android application ) or

    2. add an image: How to add image in a TextView text?

提交回复
热议问题