References:
http://developer.android.com/intl/zh-tw/guide/topics/resources/string-resource.html#FormattingAndStyling
Example:
<string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>Resources res = getResources();
String text = String.format(res.getString(R.string.welcome_messages), username, mailCount);
沒有留言:
張貼留言