0
products.add(new Product(getResources().getString(R.string.ChecklistData)),
              R.drawable.ic_launcher, false));

My StringArray in xml call CheckListData and the Arraylist that i want to add is call products

2 Answers 2

1

You have to use

getResources().getStringArray(R.array.ChecklistData)

instead of

getResources().getString(R.string.ChecklistData)

if ChecklistData is <string-array > in strings.xml

Sign up to request clarification or add additional context in comments.

Comments

0

if ChecklistData is the string array then,use:

getResources().getStringArray(R.array.ChecklistData)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.