📜  不要连接使用 setText 显示的文本.将资源字符串与占位符一起使用. - Java 代码示例

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

代码示例1
//in xml
Hello, %1$s! You have %2$d new messages.

//using
getString(R.string.welcome_message, "Test", 0);

//the result will be
"Hello Test! you have 0 new messages"