Reputation: 19
I'm trying to create a private void method where I extract data from arrays. One of the method parameters is the array name.
getResources().getStringArray(R.array.arrayName));
Android Studio cannot resolve symbol “arrayName”. How do I correctly enter a parameter in a method?
Upvotes: 0
Views: 55
Reputation: 116
Try to send arrayId instead arrayName
loadArray(R.array.arrayName);
private void loadArray(int arrayId) {
}
Upvotes: 1