Reputation: 31
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
Upvotes: 0
Views: 1069
Reputation: 10274
if ChecklistData is the string array then,use:
getResources().getStringArray(R.array.ChecklistData)
Upvotes: 0
Reputation: 13520
You have to use
getResources().getStringArray(R.array.ChecklistData)
instead of
getResources().getString(R.string.ChecklistData)
if ChecklistData
is <string-array >
in strings.xml
Upvotes: 1