0

I would like to get all values that are stored in the strings.xml file and store them in an array list that holds just strings. What would be the easiest way to achieve this??

4

1 回答 1

0

你可以用这个单线做到这一点:

ArrayList<String> list = new ArrayList(Arrays.asList(getResources().getStringArray(R.array.strings)));//where R.array.strings is a reference to your resource
于 2013-08-08T21:32:28.297 回答