1、string.xml文件中的整型和string型代替:
<string name="text">我是弟%1$d个到达,后面还有%2$d个人,我们才是%3$s !</string>
在TextView中设置:
String s = String.format(getResources().getString(R.string.text), 1,3,"胜利者");
tvLimitNum.setText(s);
1、string.xml文件中的整型和string型代替:
<string name="text">我是弟%1$d个到达,后面还有%2$d个人,我们才是%3$s !</string>
在TextView中设置:
String s = String.format(getResources().getString(R.string.text), 1,3,"胜利者");
tvLimitNum.setText(s);