I have a ArrayList and I want to put a lot of strings into it (several hundred) but I don’t want to code around a huge list of .add()’s and such. Can I important the strings from my strings.xml file into the ArrayList? If so, how?
Share
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.
If you have the values saved in strings.xml file you can simply do this:
or