android 中string.xml中的%1$s

idView.setText(getString(R.string.estate_id, mCollectParamObj.getPlotNo()));

estate_id:小区号%1$s

%d   (表示整数)

%f    (表示浮点数)

%s   (表示字符串)

 String temp = getResources().getString(R.string.loading);
String timeTip = String.format(temp,123456.123456);

原文地址:https://www.cnblogs.com/zhaoleigege/p/4997200.html