diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-11-16 17:18:12 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-11-17 19:48:39 +0800 |
commit | 0ca031ca9fef394f27b7cc9722ffc5a198cb964e (patch) | |
tree | 27e459276721e2d26018b8ef25c22792617848e1 /src | |
parent | 948e75e8e3fd2ec98a08e65efdb6e5eb6d02c33b (diff) | |
download | LegacyCamera-0ca031ca9fef394f27b7cc9722ffc5a198cb964e.zip LegacyCamera-0ca031ca9fef394f27b7cc9722ffc5a198cb964e.tar.gz LegacyCamera-0ca031ca9fef394f27b7cc9722ffc5a198cb964e.tar.bz2 |
Rotate priority indicators according to the device orientation.
+ Do not show flash indicator if it is off.
bug:5039279
Change-Id: I329b63d04f46fbe23f5ade3e4cacf446ce41f98c
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index f0c1f30..6bded2c 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -175,6 +175,8 @@ public class Camera extends ActivityBase implements FocusManager.Listener, private ImageView mSceneIndicator; private ImageView mWhiteBalanceIndicator; private ImageView mFocusIndicator; + // A view group that contains all the small indicators. + private Rotatable mOnScreenIndicators; // We use a thread in ImageSaver to do the work of saving images and // generating thumbnails. This reduces the shot-to-shot time. @@ -647,10 +649,12 @@ public class Camera extends ActivityBase implements FocusManager.Listener, } if (Parameters.FLASH_MODE_AUTO.equals(value)) { mFlashIndicator.setImageResource(R.drawable.ic_indicators_landscape_flash_auto); + mFlashIndicator.setVisibility(View.VISIBLE); } else if (Parameters.FLASH_MODE_ON.equals(value)) { mFlashIndicator.setImageResource(R.drawable.ic_indicators_landscape_flash_on); + mFlashIndicator.setVisibility(View.VISIBLE); } else if (Parameters.FLASH_MODE_OFF.equals(value)) { - mFlashIndicator.setImageResource(R.drawable.ic_indicators_landscape_flash_off); + mFlashIndicator.setVisibility(View.GONE); } } @@ -1178,6 +1182,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, } mZoomControl = (ZoomControl) findViewById(R.id.zoom_control); + mOnScreenIndicators = (Rotatable) findViewById(R.id.on_screen_indicators); mLocationManager = new LocationManager(this, this); mBackCameraId = CameraHolder.instance().getBackCameraId(); @@ -1306,7 +1311,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, private void setOrientationIndicator(int orientation) { Rotatable[] indicators = {mThumbnailView, mModePicker, mSharePopup, mIndicatorControlContainer, mZoomControl, mFocusAreaIndicator, mFaceView, - mReviewCancelButton, mReviewDoneButton, mRotateDialog}; + mReviewCancelButton, mReviewDoneButton, mRotateDialog, mOnScreenIndicators}; for (Rotatable indicator : indicators) { if (indicator != null) indicator.setOrientation(orientation); } |