コード例 #1
0
 @Override
 public void onSave(final WallpaperPickerActivity a) {
   boolean finishActivityWhenDone = true;
   OnBitmapCroppedHandler h =
       new OnBitmapCroppedHandler() {
         public void onBitmapCropped(byte[] imageBytes) {
           Point thumbSize = getDefaultThumbnailSize(a.getResources());
           // rotation is set to 0 since imageBytes has already been correctly rotated
           Bitmap thumb = createThumbnail(thumbSize, null, null, imageBytes, null, 0, 0, true);
           a.getSavedImages().writeImage(thumb, imageBytes);
         }
       };
   a.cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone);
 }
コード例 #2
0
 @Override
 public void onSave(WallpaperPickerActivity a) {
   boolean finishActivityWhenDone = true;
   a.cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone);
 }