2012-04-05 13 views
3

可能性の重複は:
Enforcing spaces in string resourcesエスケープ空白のAndroidのstrings.xml

これは私が私のAndroidのプロジェクトのために使うのstrings.xmlファイルです。

........ 
........ 
<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> 
........ 
........ 

この問題は、"Block Count\t\t\t: "のような文字列の末尾に空白がなくなることが問題です。 javaによって返されるのは"Block Count\t\t\t:"です。これを修正するには?

+0

@ SergeyGlotov Good find。ありがとう –

答えて

14

Androidは最後にスペースを保持することをサポートしていません。詳しくはthisを参照してください。

解決策 - スラッシュ - 回避策は、その接尾辞スペースの代わりに\ u0020を使用することです。