📜  android xml 字符串参数占位符 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:44.998000             🧑  作者: Mango

代码示例1
In the strings.xml:
Hello, %1$s! You have %2$d new messages.

In the code:
Resources res = getResources();
String text = String.format(res.getString(R.string.welcome_messages), username, mailCount);