【问题标题】:stop xml entity from producing square阻止 xml 实体生成正方形
【发布时间】:2012-01-11 16:30:24
【问题描述】:

我的 xml 文件中有以下内容,它给了我一个正方形 ⃠

<?xml version="1.0" encoding="utf-8"?>
...
<Button android:text="&#8416" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
...

该字符是“无符号”/禁止符号,但它显示为正方形...其他符号显示良好,如欧元 €。

问题是我如何让符号显示,如果我不能,我怎么知道哪些符号会起作用,哪些不会起作用....是否有某个地方的主列表

【问题讨论】:

  • 好的,是没有入口标志符号吗? wolframalpha.com/input/?i=%26%238416%3B&lk=1
  • 它通常被称为“无符号”或“禁止符号”,但链接中描述的内容是正确的
  • 好的,看看我的答案 - 以这种方式使用图像可以保证输出到用户屏幕的内容是您想要的。

标签: android xml entity


【解决方案1】:

好的,由于各种原因,它不会显示和there are other posts on this

为什么不在图像中使用左侧可绘制对象:

android:drawableLeft="@drawable/myicon" 

同样的结果,您不必担心字符编码和字体。

【讨论】:

    【解决方案2】:

    有时这取决于您使用的字体。我有一个链接可以查看。我一找到就回来。

    更新: 给你 - http://www.fileformat.info/info/unicode/font/index.htm

    【讨论】:

      猜你喜欢
      • 2023-03-07
      • 1970-01-01
      • 2010-11-14
      • 1970-01-01
      • 2016-12-11
      • 2011-02-28
      • 2011-09-14
      • 2016-04-06
      • 2017-04-04
      相关资源
      最近更新 更多