android 获取字符串的方法

字符串数组可以在value文件夹中声明:

 

image

 

 

书写的内容是:

image

 

两者的读取方式略有不同:
如果是读取数字的话,  使用:

context.getResources().getStringArray( R.array.prevent_item_key_tmp)会得到一个String[]

posted @ 2015-11-12 17:12  修雨轩陈  阅读(1330)  评论(0编辑  收藏  举报