コード例 #1
0
    @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);
    }
コード例 #2
0
    @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);
    }