http://www.cnblogs.com/fengzhblog/archive/2013/07/14/3188871.html
1.在string.xml文件中定义字符串及要插入的数据类型
<string name="ok">ok%1$d</string>
2.在class文件中引用该字符串:
String txtSelectOk = getResources().getString(R.string.ok);
txtSelectOk = String.format(txtSelectOk, "太棒了!");