I have a list of static key/value pairs that I need to include in my project like this one:
givenName : First Name
sn : Last Name
mail : Email
... snip ...
Where in an Android project would I put this?
Thanks
Eric
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.
You need a XML file saved at
res/values/strings.xml:Here is how you can access the values from other xmls:
Or this is how you can access the value from Java code:
Check this Android Dev Guide for full reference on String Resources.