Android – How to get and set string Resource values in android

androidandroid-resourcesstring

I've declare a String:

<string name="Please">Please Select</string>

in the res/values/Strings.xml. Now I want to access this String value but what I can get can go till id not value like:

 int i = findViewById(R.string.Please);

But what I want is just the value of the string Please.

Thanks for all of your answer but my problem is a little bigger

What I wanted to do is just to display date with app_name

from all your answers i can get the app_name String
but whether I can set
This app_name with current date

<string name="app_name">My app</string>

and also I'm to set my in this way

My app(in Left alignment)             Date (in right aligment)

and also on start of first activity i want to set app_name and not on every activity;

I think it may work let me try

setResource().setString(R.string.Please);

but no setResource() method sorry.

Best Solution

Try like this

String temp = getResources().getString(R.string.Please);