String [] s = {"lol","cf","nz"} List<String> list = Arrays.asList(s);
2、arrays.xml中获取String数组
arrays.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="title_item"> <item>lol</item> <item>cf</item> <item>nz</item> <item>dota</item> <item>qq</item> </string-array> </resources>
在java中获取
String[] s = getResources().getStringArray(R.array.title_item)