summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-23 20:52:26 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-24 09:21:43 -0700
commit949584340c9f5f41a6133ba06058af280490f0c8 (patch)
tree50e9c24fc77b0ce5f9ef0db8a413bf0910b029ca /src/com
parentf4a732646e9a4bf6f1f02b4eac0147adca4287c9 (diff)
downloadandroid_packages_apps_Gallery2-949584340c9f5f41a6133ba06058af280490f0c8.tar.gz
android_packages_apps_Gallery2-949584340c9f5f41a6133ba06058af280490f0c8.tar.bz2
android_packages_apps_Gallery2-949584340c9f5f41a6133ba06058af280490f0c8.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.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