bitmap&bitmapdrawable的问题

BitmapDrawable localBitmapDrawable = new BitmapDrawable(paramBitmap);


原本的density
引用
paramBitmap240

变成了

引用
localBitmapDrawable 160



lookit

    /**
     * Create drawable from a bitmap, setting initial target density based on
     * the display metrics of the resources.
     */
    public BitmapDrawable(Resources res, Bitmap bitmap) {
        this(new BitmapState(bitmap), res);
        mBitmapState.mTargetDensity = mTargetDensity;
    }


纠结了好多天了!

你可能感兴趣的:(bitmapdrawable)