Posted By

BenClayton on 03/01/11


Tagged


Versions (?)

Android: Use format strings in a strings.xml file


 / Published in: Java
 

  1. // in strings.xml..
  2. <string name="my_text">Thanks for playing %s. You scored %d points!</string>
  3.  
  4.  
  5. // and in the java code:
  6. String.format(getString(R.string.my_text), "Bob", 500);

Report this snippet  

You need to login to post a comment.