In an Android text resource, how can I use a space?
For example, when I do a “result” and not a “result”, I still see the “result” in my textual representation of the application.
Have you tried to surround your string with quotation marks? Maybe leading and trailing spaces are automatically deleted.
<string name="foo">" bar"</string>
See an example at https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling in the section "Escaping apostrophes and quotes".
As an alternative to Andreas Clober's answer, you can use this method:
<string name="foobar">foo \u0020 bar</string>
In this case, the space character in unicode (\ u0020) is used.
Just do it
<string name="str_name">" Hello World!</string>