@Override protected BitmapDrawable doInBackground(Integer... params) { Point backSize = Utils.getBackgroundSize(resources); Bitmap back = Utils.resizeBitmapFromResource(resources, params[0], backSize.x, backSize.y); return new BitmapDrawable(resources, back); }
@Override protected BitmapDrawable doInBackground(Bitmap... params) { Point backSize = Utils.getBackgroundSize(resources); Bitmap back = Utils.resizeBitmap(params[0], backSize.x, backSize.y); // params[0].recycle(); return new BitmapDrawable(resources, back); }
@Override protected BitmapDrawable doInBackground(Integer... params) { Point photoSize = Utils.getUserPhotoSize(resources); Bitmap photo = Utils.resizeBitmapFromResource(resources, params[0], photoSize.x, photoSize.y); circularPhoto = new BitmapDrawable(resources, Utils.getCroppedBitmapDrawable(photo)); return new BitmapDrawable(resources, photo); }
public void recycle() { Utils.recycleDrawable(photo); Utils.recycleDrawable(circularPhoto); Utils.recycleDrawable(background); }