7
如何使用浮動和雙精度(小數位)xliff格式化字符串?Android getString():xliff格式float/double
<string name="test">Test <xliff:g id="float1">%1$f</xliff:g> <xliff:g id="float2">%1$.2f</xliff:g></string>
代碼:
mContext.getString(R.string.test, 1.23456);