您的位置:首页 > 其它

diff between Context.getResources().getString() and Context.getString()

2011-03-08 17:54 633 查看
in the refrences ,I did't know what's its mean.

Context.getResources().getString() Return the string value associated with a particular resource ID. It will be stripped of any styled text information.
Context.getString() Return a localized string from the application's package's default string table.

so i got the sources ,found that they are totally the same.

/android_opensource/frameworks/base/core/java/android/content/Context.java
...
141 /**
142 * Return a localized string from the application's package's
143 * default string table.
144 *
145 * @param resId Resource id for the string
146 */
147 public final String getString(int resId) {
148 return getResources().getString(resId);
149 }
...

read the sources more

from:http://hi.baidu.com/ksoftware/blog/item/2b7b0ad131320a329b5027a7.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐