How to keep the spaces at the end and/or at the beginning of a String in string.xml ?

在 strings.xml 中,写一个 string:

%1$s个故事 |
%1$s个粉丝

在代码中使用,运行到手机上时,显示的效果是这样的:

23个故事 |23个粉丝

"|"后面的空格丢了。

解决方案:
url

Score :\u0020

使用 \u0020 代替空格。

posted @ 2016-10-17 10:53  力能扛鼎  阅读(135)  评论(0编辑  收藏  举报