diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-23 20:52:26 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-10-24 09:21:43 -0700 |
commit | 30cea9fd7d02cffe4a15c58a61fa823fee29db42 (patch) | |
tree | 3e20fd89dfa9c098f0c491706e2e20e7cfacf4dd /src/com | |
parent | b89ad7cf365087de7ca11166bcfbfecbe4584b98 (diff) | |
download | android_packages_apps_Snap-30cea9fd7d02cffe4a15c58a61fa823fee29db42.tar.gz android_packages_apps_Snap-30cea9fd7d02cffe4a15c58a61fa823fee29db42.tar.bz2 android_packages_apps_Snap-30cea9fd7d02cffe4a15c58a61fa823fee29db42.zip |
Do not show bottom controls when undo bar is visible
Bug: 7403458
Change-Id: I1e789ebd7f08256a1ccbdb2ac9f2f9f97d0859c6
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 7 | ||||
-rw-r--r-- | src/com/android/gallery3d/ui/PhotoView.java | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index b24f080f0..2522188cf 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -598,7 +598,7 @@ public class PhotoPage extends ActivityState implements @Override public boolean canDisplayBottomControls() { - return mIsActive; + return mIsActive && !mPhotoView.canUndo(); } @Override @@ -1528,4 +1528,9 @@ public class PhotoPage extends ActivityState implements } } } + + @Override + public void onUndoBarVisibilityChanged(boolean visible) { + refreshBottomControlsWhenReady(); + } } diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index f129961ff..0758656a1 100644 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -125,6 +125,7 @@ public class PhotoView extends GLView { public void onCommitDeleteImage(); public void onFilmModeChanged(boolean enabled); public void onPictureCenter(boolean isCamera); + public void onUndoBarVisibilityChanged(boolean visible); } // The rules about orientation locking: @@ -1359,6 +1360,7 @@ public class PhotoView extends GLView { if(deleteLast) mUndoBarState |= UNDO_BAR_DELETE_LAST; mUndoBar.animateVisibility(GLView.VISIBLE); mHandler.sendEmptyMessageDelayed(MSG_UNDO_BAR_TIMEOUT, 3000); + if (mListener != null) mListener.onUndoBarVisibilityChanged(true); } private void hideUndoBar() { @@ -1367,6 +1369,7 @@ public class PhotoView extends GLView { mUndoBar.animateVisibility(GLView.INVISIBLE); mUndoBarState = 0; mUndoIndexHint = Integer.MAX_VALUE; + mListener.onUndoBarVisibilityChanged(false); } // Check if the one of the conditions for hiding the undo bar has been |