定义:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="str1">Hello</string>
    <string name="str2"  formatted="false" ><![CDATA[值=(B-C)÷((C+D))×100%,若<80%则正常,反之则异常。]]></string>
    <string name="str3" >你好,我是%1$s,今年%2$d岁</string>
</resources>


使用:
String s = this.getResrcStr(R.string.str3);
s = String.format(s, "张三",80);
Logcat.e("",s);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-08-01
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2021-07-09
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案