I have written the line:
String Mess = R.string.mess_1 ;
to get string value, but instead of returning string, it is giving me id of type integer. How can I get its string value? I mentioned the string value in the
String mess = getResources().getString(R.string.mess_1);
String string = getString(R.string.hello);
You can use either
getText(int) to retrieve a string.
getText(int) will retain any rich text styling applied to the string.
If not in activity but have access to context: