i have defined some strings in the strings.xml file. Now I need to put some extra space between some numbers in the string. When I type extra space characters t
Android doesn't support keeping the spaces at the end of the string in String.xml file so if you want space after string you need to use this unicode in between the words.
\u0020
It is a unicode space character.
As already mentioned the correct way to have a space in an XML file is by using \u0020 which is the unicode character for a space.
Example:
<string name="spelatonertext3">-4,\u00205,\u0020-5,\u00206,\u0020-6</string>
Other suggestions have said to use   or   but there is two downsides to this. The first downside is that these are ASCII characters so you are relying on something like a TextView to parse them. The second downside is that   can sometimes cause strange wrapping in TextViews.