标签:
1.把数据放到values文件夹的strings.xml文件中:
<resources>
<string-array name = "sports">
<item>足球</item>
<item>篮球</item>
<item>冰球</item>
</string-array>
</resources>‘
2.获取数据:String[] sports = this.getResources().getStringArray(R.array.sports)
3.获取assets中的资源:InputStream is = getResources().getAssets().open("city.xml");
标签:
原文地址:http://www.cnblogs.com/aWay01/p/5240465.html