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.xml
file.
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.xml
file.
You can use this code:
getString(R.string.your_string) get the result
I'm using this:
If you are in an activity you can use
If you are not in an Activity use this :