我的字符串在以下几行中都包含了
<resources>
<string name="my_name">Android</string>
<string name="welcome">Hi @string/name welcome !</string>
<string name="goodbye">Goodbye @string/name. Have a nice day</string>
</<resources>
我的代码如下检索字符串
String welcome = mContext.getResources().getString(R.string.welcome);
String goodbye = mContext.getResources().getString(R.string.goodbye);
我喜欢得到如下输出
Hi Android welcome !
Goodbye Android. Have a nice day
感谢解决方案