在android的源代码中
/**
* Return a global shared Resources object that provides access to only
* system resources (no application resources), and is not configured for
* the current screen (can not use dimension units, does not change based
* on orientation, etc).
*/
public static Resources getSystem() {
synchronized (sSync) {
Resources ret = mSystem;
if (ret == null) {
ret = new Resources();
mSystem = ret;
}
return ret;
}
}
从代码中我们可以得到getSystem()返回的资源没有为当前屏幕配置,所以在BitmapDrawable(Resource res,Bitmap bitmap)中,是不是我们只能使用context.getResource()?