Excluding spaces Android strings.xml

Possible duplicate:
Executing whitespace in string resources

This is the strings.xml file that I am using for my android project.

........
........
<string name="bcount">Block Count\t\t\t: </string>
<string name="fbcount">Free Blocks\t\t\t: </string>
<string name="blsiz">Block Size\t\t\t: </string>
<string name="newvfs">New VFS</string>
<string name="mknewfold">Making new folder </string>
<string name="creating">Creating </string>
........
........

      

The problem is that spaces at the end of lines such as "Block Count\t\t\t: "

are disappearing. Java only returns "Block Count\t\t\t:"

. How to fix it?

+3


source to share


1 answer


Android doesn't support preserving trailing whitespace, see this . See the Stackoverflow answer for more information.



The slash workaround solution is to use \ u0020 instead of these suffix spaces.

+14


source







All Articles