Android: Pass String Array From Values To .java
I am using this code to pull my string array from my values folder: String achievementNames[] = getResources().getStringArray(R.array.achieveString); String achievementDescript
Solution 1:
Make sure you pass a Context
object to wherever you call this method from (as my guess is that getResources()
is returning null
). With this Context
object, you can call,
context.getResources().getStringArray(...);
Post a Comment for "Android: Pass String Array From Values To .java"