如何在android字符串资源的末尾添加一个空格

如何在android字符串资源的末尾添加一个空格,android,Android,使用以下资源: <string name="str">ends with a space </string> 以空格结尾 最后失去的空间 <string name="str">ends with a space&#160;</string> 以空格 结尾; 保留空间,但android将其视为无中断空间 有没有办法在资源字符串的末尾指定一个中断空间?这是一个库函数,所以我不知道在资源中可以指定什么字符串 显然,我考虑过: &l

使用以下资源:

<string name="str">ends with a space </string>
以空格结尾
最后失去的空间

<string name="str">ends with a space&#160;</string>
以空格 结尾;
保留空间,但android将其视为无中断空间

有没有办法在资源字符串的末尾指定一个中断空间?这是一个库函数,所以我不知道在资源中可以指定什么字符串

显然,我考虑过:

<string name="str">ends with a space£</string>
<string name="my_breaking_space_at_end_of_android_resource">£</string>
以空格结尾
£

使用正则表达式。

你似乎已经尝试了很多东西。您还可以尝试以下方法:

1) 只需在末尾留出空格,并用双引号将整个字符串括起来:

<string name="foo">"End with space "</string>. 
希望这两个都能帮助你

<string name="foo">End with space \u0020</string>