summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java7
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java3
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