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

    技术2022-05-19  20

    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's143      * default string table.144      *145      * @param resId Resource id for the string146      */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


    最新回复(0)