diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-12-02 18:47:04 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2010-12-02 20:07:07 +0800 |
commit | 85337c206051c2c7d33cca83255e00d92e288421 (patch) | |
tree | 94d8ceaab16a321bc4be0e03920f848565de4c8d /src | |
parent | 937ea10204656beaa848df913dc9cb9b5a9b934f (diff) | |
download | LegacyCamera-85337c206051c2c7d33cca83255e00d92e288421.zip LegacyCamera-85337c206051c2c7d33cca83255e00d92e288421.tar.gz LegacyCamera-85337c206051c2c7d33cca83255e00d92e288421.tar.bz2 |
Fix the camera layout in image capture intent mode.
Bug: 3226748
Change-Id: I0f01f4848aee7c8f82f785c5e42266d6247d06b4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 21 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 3d7c3f5..9e4700c 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -161,6 +161,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, private GestureDetector mPopupGestureDetector; private SwitcherSet mSwitcher; private boolean mStartPreviewFail = false; + private View mIndicatorWheel; private GLRootView mGLRootView; @@ -381,6 +382,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, mThumbnailButton = (RotateImageView) findViewById(R.id.review_thumbnail); if (mThumbnailButton != null) { + mThumbnailButton.setVisibility(View.VISIBLE); mThumbnailButton.setOnClickListener(this); mThumbnailButton.loadData(ImageManager.getLastImageThumbPath()); updateThumbnailButton(); @@ -1006,14 +1008,17 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, if (mIsImageCaptureIntent) { setupCaptureParams(); - View controlBar = findViewById(R.id.control_bar); - controlBar.findViewById(R.id.btn_cancel).setOnClickListener(this); - controlBar.findViewById(R.id.btn_retake).setOnClickListener(this); - controlBar.findViewById(R.id.btn_done).setOnClickListener(this); + View reviewControl = findViewById(R.id.review_control); + reviewControl.setVisibility(View.VISIBLE); + reviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this); + reviewControl.findViewById(R.id.btn_retake).setOnClickListener(this); + reviewControl.findViewById(R.id.btn_done).setOnClickListener(this); } else { mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch); + mSwitcher.setVisibility(View.VISIBLE); mSwitcher.setOnSwitchListener(this); } + mIndicatorWheel = findViewById(R.id.indicator_wheel); // Show zoom picker. ViewStub zoomStub = (ViewStub) findViewById(R.id.zoom_stub); @@ -2109,7 +2114,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, private void showPostCaptureAlert() { if (mIsImageCaptureIntent) { - findViewById(R.id.shutter_button).setVisibility(View.INVISIBLE); + if (mIndicatorWheel == null) { + mShutterButton.setVisibility(View.INVISIBLE); + } int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { View button = findViewById(id); @@ -2120,7 +2127,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, private void hidePostCaptureAlert() { if (mIsImageCaptureIntent) { - findViewById(R.id.shutter_button).setVisibility(View.VISIBLE); + if (mIndicatorWheel == null) { + mShutterButton.setVisibility(View.VISIBLE); + } int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { View button = findViewById(id); diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index a6680be..952c455 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -360,6 +360,7 @@ public class VideoCamera extends NoSearchActivity initThumbnailButton(); mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch); + mSwitcher.setVisibility(View.VISIBLE); mSwitcher.setOnSwitchListener(this); } @@ -1566,6 +1567,7 @@ public class VideoCamera extends NoSearchActivity private void initThumbnailButton() { mThumbnailButton = (RotateImageView)findViewById(R.id.review_thumbnail); if (mThumbnailButton != null) { + mThumbnailButton.setVisibility(View.VISIBLE); mThumbnailButton.setOnClickListener(this); mThumbnailButton.loadData(ImageManager.getLastVideoThumbPath()); } |