I want to get an array of strings reading from arrays.xml file we add in android values/ folder. Could any one kindly give a solution for this. Otherwise I will have to input each these entries in strings.xml and take them to java code using getResources()getString()
Thank you. Tharindu
getResources().getStringArray(R.array.umc_profile_values);
worked 4 me!
Resources res = getResources();
String[] name = res.getStringArray(R.array.name_array);
I don't have an IDE in front of me right now, but I think you should be able to do something like R.res.arrays.YOUR_ARRAY_OF_STRINGS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With