android 获取字符串的方法

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

image

书写的内容是:

image

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

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

原文地址:https://www.cnblogs.com/greentomlee/p/4959635.html