I want to use a particular string found in the Values folder into normal classes. This is for my localization process with different languages.
How would I do this?
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.
Use the getString() method on a
Context(such as anActivity), specifying the key in this form:R.string.you_keyIf you need to get a String outside of an Activity, like in a helper class or something, just make sure you pass in a reference to a context.