Hey Warren, There seems to be various workarounds for this issue here: http://stackoverflow.com/questions/1587056/android-string-concatenate-how-to-keep-the-spaces-at-the-end-and-or-beginnin
Hopefully one of them will get what you need! I hope this helps, Chris Hardy On Sat, Dec 3, 2011 at 8:24 AM, warren burch <[email protected]> wrote: > 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 > -- ChrisNTR Microsoft ASPInsider http://weblogs.asp.net/chrishardy http://twitter.com/chrisntr
_______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
