summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-03-31 16:08:52 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:45:51 -0700
commitb79e19bd4d19df831c68a08edda2435e1b6c79f7 (patch)
tree5f7609419341ad324fd28d204485aac5648137a6
parent01a627447b22cfdd29e9b792ea72e50975d4a74a (diff)
downloadandroid_packages_apps_Snap-b79e19bd4d19df831c68a08edda2435e1b6c79f7.zip
android_packages_apps_Snap-b79e19bd4d19df831c68a08edda2435e1b6c79f7.tar.gz
android_packages_apps_Snap-b79e19bd4d19df831c68a08edda2435e1b6c79f7.tar.bz2
SnapdragonCamera: Make switcher visible only when it was
Make switcher button be visible only when it was set to be visible in first place. Change-Id: Id0df702b990bbada02ac25eb6981c6bd5e4082b0 CRs-Fixed: 995902
-rw-r--r--src/com/android/camera/PhotoMenu.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java
index 57fcf90..0c09ede 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -17,6 +17,7 @@
package com.android.camera;
+import java.util.HashSet;
import java.util.Locale;
import android.animation.Animator;
@@ -102,6 +103,7 @@ public class PhotoMenu extends MenuController
private static final int ANIMATION_DURATION = 300;
private int previewMenuSize;
private Rect mTmpRect = new Rect();
+ private HashSet<View> mWasVisibleSet = new HashSet<View>();
public PhotoMenu(CameraActivity activity, PhotoUI ui) {
super(activity);
@@ -1230,7 +1232,17 @@ public class PhotoMenu extends MenuController
mHdrSwitcher.setVisibility(status);
mSceneModeSwitcher.setVisibility(status);
mFilterModeSwitcher.setVisibility(status);
- mCameraSwitcher.setVisibility(status);
+ if(status == View.INVISIBLE) {
+ if(mCameraSwitcher.getVisibility() == View.VISIBLE) {
+ mWasVisibleSet.add(mCameraSwitcher);
+ }
+ mCameraSwitcher.setVisibility(status);
+ } else {
+ if(mWasVisibleSet.contains(mCameraSwitcher)) {
+ mCameraSwitcher.setVisibility(status);
+ mWasVisibleSet.remove(mCameraSwitcher);
+ }
+ }
mPreviewThumbnail.setVisibility(status);
}
}