Android strings中使用format

来源:互联网 发布:官方波段选股王软件 编辑:程序博客网 时间:2024/06/06 21:42
<string name="test_format_string">%1$s you are %2$d</string>

textView.setText(String.format(getResources().getString(R.string.test_format_string), "Jim",16));

原创粉丝点击