From 0ca031ca9fef394f27b7cc9722ffc5a198cb964e Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Wed, 16 Nov 2011 17:18:12 +0800 Subject: Rotate priority indicators according to the device orientation. + Do not show flash indicator if it is off. bug:5039279 Change-Id: I329b63d04f46fbe23f5ade3e4cacf446ce41f98c --- src/com/android/camera/Camera.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/com/android/camera') 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); } -- cgit v1.1