首页 > 技术文章 > getResources提取资源文件

realhope 2015-02-03 15:59 原文

String pxsize = context.getResources().getString(R.string.hello);
 

资源文件格式:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="hello">Hello World, WirelessActivity!</string>

</resources>
   

推荐阅读