What is the difference between two ways to obtain a string from resources:
setPositiveButton(R.string.some_string);
OR
setPositiveButton((getString(R.string.some_string));
?
In both cases I get the same result.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
is a public final static int that is a fixed ID to a specific String in your R.java file. This is generated automatically.
returns the String referenced by the above by reading the R.java file.
It depends on the implementation of
and
what difference internally is made, like with error checks.