TextView控件直接将特殊字符写入TextView是会报错的,需要对特殊字符进行ASCII转换。

特殊字符的ASCII码对照表:

Android之TextView显示特殊字符

举个栗子:

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="&#060;栗子&#062;"/>

 

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-12-02
  • 2021-07-23
猜你喜欢
  • 2022-01-04
  • 2022-02-24
  • 2021-09-05
  • 2021-08-22
  • 2021-12-31
  • 2021-09-21
  • 2021-12-10
相关资源
相似解决方案