android xml中应用占位符
Formatting and Styling
Here are a few important things you should know about how to properlyformat and style your string resources.
Escaping apostrophes and quotesIf you have an apostrophe or a quote in your string, you must either escape it or enclose thewhole string in the other type of enclosing quotes. For example, here are some stings thatdo and don't work:
fromHtml(String), the characters come out the way they wereoriginally written. For example:String escapedUsername = TextUtil.htmlEncode
(username);Resources res =getResources()
;String text = String.format(res.getString(R.string.welcome_messages), escapedUsername, mailCount);CharSequence styledText = Html.fromHtml(text);