我有一个 TextView ,将几个字符显示为矩形,但我不知道它们来自哪里。有什么想法吗?
这是带有文本的 XML:
<item>
Five cents per gallon discount. Go online to www.amerigas.com or yellow pages for the closest AmeriGas location.
\n\n
Offers subject to change without notice, some restrictions may apply, contact store for details. Offer does not apply to fixed price customers. You must provide your Farm Bureau membership number to your AmeriGas dealer prior to delivery of your propane in order to receive the discount.\n
</item>
这是截图:
编辑:在 XML 中,当我将其粘贴到此处时,我注意到 Offers 之前有一个很大的空间,这是字符出现的地方。不过,我的编辑器中没有显示该空间。
最佳答案
我的猜测是,在 XML 文件中的 \n\n
之后,您有制表符或字体无法正确处理的其他一些奇怪的空白字符。将它们替换为常规空格,小方框应该会消失。
关于android - Android TextView 中显示的奇怪字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18447553/