summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/PhotoPageBottomControls.java
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-10-18 14:20:39 -0700
committerGeorge Mount <mount@google.com>2012-10-18 16:32:48 -0700
commit4b4dbd225685502f4249c2bf25bf74f7ce526645 (patch)
tree69bbb97d12a4111458a69a72f270c6ffe46805a4 /src/com/android/gallery3d/app/PhotoPageBottomControls.java
parentc6ea040010a0794bc78a43c4522cfb03d9e488e2 (diff)
downloadandroid_packages_apps_Gallery2-4b4dbd225685502f4249c2bf25bf74f7ce526645.tar.gz
android_packages_apps_Gallery2-4b4dbd225685502f4249c2bf25bf74f7ce526645.tar.bz2
android_packages_apps_Gallery2-4b4dbd225685502f4249c2bf25bf74f7ce526645.zip
Remove panorama checks from supported operations.
Bug 7351383 Bug 7349438 Move panorama support checks from getSupportedOperations so that calls to getSupportedOperations are consistent. Panorama checks are moved to only based on callbacks. Change-Id: Id9ff138204df84c6fb0a4c971dcea59f1220aee2
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPageBottomControls.java')
-rw-r--r--src/com/android/gallery3d/app/PhotoPageBottomControls.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPageBottomControls.java b/src/com/android/gallery3d/app/PhotoPageBottomControls.java
index 40588e128..e58e454ac 100644
--- a/src/com/android/gallery3d/app/PhotoPageBottomControls.java
+++ b/src/com/android/gallery3d/app/PhotoPageBottomControls.java
@@ -23,7 +23,6 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
-import android.view.animation.ScaleAnimation;
import android.widget.RelativeLayout;
import com.android.gallery3d.R;
@@ -34,8 +33,9 @@ import java.util.Map;
public class PhotoPageBottomControls implements OnClickListener {
public interface Delegate {
public boolean canDisplayBottomControls();
- public boolean canDisplayBottomControl(int control);
+ public boolean canDisplayBottomControl(int control, boolean isPanorama);
public void onBottomControlClicked(int control);
+ public void refreshBottomControlsWhenReady();
}
private Delegate mDelegate;
@@ -76,7 +76,7 @@ public class PhotoPageBottomControls implements OnClickListener {
mContainerAnimIn.setDuration(CONTAINER_ANIM_DURATION_MS);
mContainerAnimOut.setDuration(CONTAINER_ANIM_DURATION_MS);
- refresh();
+ mDelegate.refreshBottomControlsWhenReady();
}
private void hide() {
@@ -93,7 +93,7 @@ public class PhotoPageBottomControls implements OnClickListener {
mContainer.setVisibility(View.VISIBLE);
}
- public void refresh() {
+ public void refresh(boolean isPanorama) {
boolean visible = mDelegate.canDisplayBottomControls();
boolean containerVisibilityChanged = (visible != mContainerVisible);
if (containerVisibilityChanged) {
@@ -109,7 +109,7 @@ public class PhotoPageBottomControls implements OnClickListener {
}
for (View control : mControlsVisible.keySet()) {
Boolean prevVisibility = mControlsVisible.get(control);
- boolean curVisibility = mDelegate.canDisplayBottomControl(control.getId());
+ boolean curVisibility = mDelegate.canDisplayBottomControl(control.getId(), isPanorama);
if (prevVisibility.booleanValue() != curVisibility) {
if (!containerVisibilityChanged) {
control.clearAnimation();