How to put space character into a string name in XML? How to put space character into a string name in XML? xml xml

How to put space character into a string name in XML?


to use white space in xml as string use  . XML won't take white space as it is. it will trim the white space before setting it. So use   instead of single white space


Insert \u0020 directly in the XML for a blank you would like to preserve.

<string name="spelatonertext3">-4, \u00205, \u0020\u0020-5, \u00206, \u0020-6,</string>


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.