在Activity类:
this.getString(R.string.resource_name)
非Activity类:
从别处传context过来
context.getString(R.string.resource_name)