我已经写了一行:
String Mess= R.string.mess_1 ;
得到的字符串值,而不是返回字符串,它给我整型的ID。任何人都可以指导我如何我可以得到它的字符串值?我提到的 string.xml
文件中的字符串值。
to get string value, but instead of returning string, it is giving me id of type integer. Can anyone guide me as to how I can get its string value? I mentioned the string value in the string.xml
file.
任何帮助将是AP preciated。
Any help would be appreciated.
试试这个
String mess = getResources().getString(R.string.mess_1);
更多信息here