我有一个文本视图,显示几个字符作为矩形,我无法弄清楚它们来自哪里。有什么想法吗?
以下是带有文本的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>
这是截图:
答案 0 :(得分:2)
我的猜测是,在XML文件中的\n\n
之后,您有一个标签或其他一些奇怪的空白字符,字体无法正确处理。用常规空间替换它们,小盒子应该消失。
答案 1 :(得分:0)
您需要更换特殊字符\ n。
就这样做:
string = string.replace("\\\n", System.getProperty("line.separator"));