字符串资源新行/ N不可能的? [英] String Resource new line /n not possible?
本文介绍了字符串资源新行/ N不可能的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它似乎并不像它可以将新行/ N添加到XML资源字符串。是否有这样做的另一种方式?
It doesn't seem like it's possible to add a new line "/n" to an XML resource string. Is there another way of doing this?
感谢
推荐答案
使用blackslash不是forwardslash。 \ N
use a blackslash not a forwardslash. "\n"
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="title">Hello\nWorld!</string>
</resources>
另外,如果你打算使用的字符串作为HTML,您可以使用&放大器; LT; BR /&放大器; GT;
作为换行符(&LT; BR /&GT;
)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="title">Hello<br />World!</string>
</resources>
这篇关于字符串资源新行/ N不可能的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文