关于[Android] strings.xml的使用方法几例

来源:互联网 发布:系统网络架构设计 编辑:程序博客网 时间:2024/06/08 10:28

 string里value的办法。

1. 在AndroidManifest.xml与layout里:



2.在activity里:

this.getString(R.string.resource_name)  
3.在其他地方如 ListAdapter,(必须有Context或Applicaton)
context.getString(R.string.resource_name)   

pplication.getString(R.string.resource_name)  

原创粉丝点击