【问题标题】:Android studio doesn't show "&" symbol in StringAndroid Studio 在字符串中不显示“&”符号
【发布时间】:2019-05-15 19:40:47
【问题描述】:

当我尝试将& 符号写入& 之类的字符串时,它只会留下白色的地方。我没有得到任何错误或任何东西,只是它没有显示出来。 有谁知道如何解决这个问题?

“这是一个字符串& 这里是& 符号”

【问题讨论】:

  • 你有照片吗?
  • 我不知道你到底是什么意思,但我添加了一张图片来澄清
  • 您的键盘似乎与您的操作系统配置不匹配

标签: android xml string android-studio


【解决方案1】:

你可以写& 使用:

&

\u0026

像这样:

"this is a string & symbol"

"this is a string \u0026 symbol"

结果:这是一个字符串 & 符号

【讨论】:

    【解决方案2】:

    使用编码&\u0026在android中显示&符号!

    【讨论】:

      猜你喜欢
      • 2017-10-10
      • 2014-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-16
      • 2016-04-14
      • 2022-01-01
      相关资源
      最近更新 更多