Return to Snippet

Revision: 42745
at March 10, 2011 02:30 by BenClayton


Initial Code
// in strings.xml
<string name="cannot_play_video">The video %1$s cannot be played.\n%2$s</string>

// to use..
<context>.getString(R.string.cannot_play_video), url, msg )

Initial URL

                                

Initial Description
note the odd %1$s syntax.  If you only have one substitution, you could just use %s.

Initial Title
Android: String in strings.xml with multiple substitutions

Initial Tags

                                

Initial Language
Objective C