Return to Snippet

Revision: 42185
at March 1, 2011 01:43 by BenClayton


Initial Code
// in strings.xml..
<string name="my_text">Thanks for playing %s. You scored %d points!</string>


// and in the java code:
String.format(getString(R.string.my_text), "Bob", 500);

Initial URL

                                

Initial Description

                                

Initial Title
Android: Use format strings in a strings.xml file

Initial Tags

                                

Initial Language
Java