in my Strings.xml file I have items which have leading and trailing
whitespace, when these strings are read from the resource these leading and
trailing whitespaces are trimmed.

taking the template app add the following to Strings.xml
<resources>
    <string name="Hello">Hello World, Click Me!</string>
    <string name="ApplicationName">MonoAndroidApplication6</string>
  <string name="One" xml:space="preserve"> 1 </string>
  <string name="Two" xml:space="preserve"> 2 </string>
  <string name="Three" xml:space="preserve"> 3 </string>
</resources>

in the Activity add the following

 button.Text = Resources.GetString(Resource.String.One) +
Resources.GetString(Resource.String.Two) +
Resources.GetString(Resource.String.Three);

you will see the text on the button is "123" not " 1  2  3 ".

I cannot replace with non-breaking spaces (ie. #a0;) since I need some words
to possibly wrap on these boundaries.

Is this a bug, is there a good workaround?

Cheers
Warren

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Whitespace-not-being-respected-in-Strings-xml-tp5044196p5044196.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to