diff options
author | Selim Cinek <cinek@google.com> | 2014-03-21 19:39:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-21 19:39:38 +0000 |
commit | a4c1ccf3e045accd321be4d4c7d2ba1941a49ab4 (patch) | |
tree | adf48e0eabf60a43a730e93207fad8421dd9dfc8 /packages/WallpaperCropper/src/com/android | |
parent | f7ad855718dc576a1618a54035b82e92356aa0d8 (diff) | |
parent | 0fa6c1b146f7ed1aba335c30878e2c1b2bf2a8f1 (diff) | |
download | frameworks_base-a4c1ccf3e045accd321be4d4c7d2ba1941a49ab4.zip frameworks_base-a4c1ccf3e045accd321be4d4c7d2ba1941a49ab4.tar.gz frameworks_base-a4c1ccf3e045accd321be4d4c7d2ba1941a49ab4.tar.bz2 |
Merge "Disable Set Wallpaper button while loading image"
Diffstat (limited to 'packages/WallpaperCropper/src/com/android')
-rw-r--r-- | packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java index e45b98c..dd906cd 100644 --- a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java +++ b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java @@ -75,6 +75,7 @@ public class WallpaperCropActivity extends Activity { protected CropView mCropView; protected Uri mUri; + private View mSetWallpaperButton; @Override protected void onCreate(Bundle savedInstanceState) { @@ -111,10 +112,12 @@ public class WallpaperCropActivity extends Activity { cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone); } }); + mSetWallpaperButton = findViewById(R.id.set_wallpaper_button); // Load image in background final BitmapRegionTileSource.UriBitmapSource bitmapSource = new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024); + mSetWallpaperButton.setVisibility(View.INVISIBLE); Runnable onLoad = new Runnable() { public void run() { if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) { @@ -122,6 +125,8 @@ public class WallpaperCropActivity extends Activity { getString(R.string.wallpaper_load_fail), Toast.LENGTH_LONG).show(); finish(); + } else { + mSetWallpaperButton.setVisibility(View.VISIBLE); } } }; |