зеркало из https://github.com/mono/mail-archives.git
99 строки
3.7 KiB
HTML
99 строки
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] Whitespace not being respected in Strings.xml?
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Whitespace%20not%20being%20respected%20in%20Strings.xml%3F&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007485.html">
|
|
<LINK REL="Next" HREF="007468.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] Whitespace not being respected in Strings.xml?</H1>
|
|
<B>warren burch</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Whitespace%20not%20being%20respected%20in%20Strings.xml%3F&In-Reply-To="
|
|
TITLE="[mono-android] Whitespace not being respected in Strings.xml?">warrenburch at gmail.com
|
|
</A><BR>
|
|
<I>Sat Dec 3 03:24:19 EST 2011</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007485.html">[mono-android] intellisense in md with m4a
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007468.html">[mono-android] Whitespace not being respected in Strings.xml?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7465">[ date ]</a>
|
|
<a href="thread.html#7465">[ thread ]</a>
|
|
<a href="subject.html#7465">[ subject ]</a>
|
|
<a href="author.html#7465">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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: <A HREF="http://mono-for-android.1047100.n5.nabble.com/Whitespace-not-being-respected-in-Strings-xml-tp5044196p5044196.html">http://mono-for-android.1047100.n5.nabble.com/Whitespace-not-being-respected-in-Strings-xml-tp5044196p5044196.html</A>
|
|
Sent from the Mono for Android mailing list archive at Nabble.com.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007485.html">[mono-android] intellisense in md with m4a
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007468.html">[mono-android] Whitespace not being respected in Strings.xml?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7465">[ date ]</a>
|
|
<a href="thread.html#7465">[ thread ]</a>
|
|
<a href="subject.html#7465">[ subject ]</a>
|
|
<a href="author.html#7465">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
|
|
mailing list</a><br>
|
|
</body></html>
|