I just stumbled on the fact that quotes won't work in Strings in xml resource files (That's single or double quotes.) More to the point, I stumbled on the fact that the Eclipse resource editor doesn't automatically translate forbidden characters into the desired format, nor does it indicate that the string you have just typed is illegal. So you could be stuck with the generated resource class (the "R" class) refusing to recompile for no readily apparent reason. (You'd have to switch to the xml view on the resource editor to see an indication of where the error is.
So how do you get around the problem? This guide shows how you can either put the entire string in quotes or, as in C, precede the apostrophe/quote with a backslash. But surprisingly, you can't use HTML-style escape characters (such as ")
No comments:
Post a Comment