diff options
author | Chih-yu Huang <akahuang@google.com> | 2011-08-30 17:28:52 +0800 |
---|---|---|
committer | Chih-yu Huang <akahuang@google.com> | 2011-09-02 10:09:40 +0800 |
commit | ea136afa2f4d38428ad486df5fb0a24db8314a3d (patch) | |
tree | 74d6e8aa7db6ad2db3d0e03274ce8eda31e17b99 /src/com/android/camera/Camera.java | |
parent | a130350e7481d07b42fbce522196b3350be3be0f (diff) | |
download | LegacyCamera-ea136afa2f4d38428ad486df5fb0a24db8314a3d.zip LegacyCamera-ea136afa2f4d38428ad486df5fb0a24db8314a3d.tar.gz LegacyCamera-ea136afa2f4d38428ad486df5fb0a24db8314a3d.tar.bz2 |
Move review control out of preview.
bug:5141555
Change-Id: I04e4ca0d0e1a40ccfe39e5276fda66ffd02ae1b5
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index c9fe858..1cc45fd 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -955,10 +955,10 @@ public class Camera extends ActivityBase implements FocusManager.Listener, super.onCreate(icicle); mIsImageCaptureIntent = isImageCaptureIntent(); + setContentView(R.layout.camera); if (mIsImageCaptureIntent) { - setContentView(R.layout.camera_attach); + findViewById(R.id.btn_cancel).setVisibility(View.VISIBLE); } else { - setContentView(R.layout.camera); mThumbnailView = (RotateImageView) findViewById(R.id.thumbnail); mThumbnailView.setVisibility(View.VISIBLE); } @@ -1014,7 +1014,6 @@ public class Camera extends ActivityBase implements FocusManager.Listener, if (mIsImageCaptureIntent) { setupCaptureParams(); - findViewById(R.id.review_control).setVisibility(View.VISIBLE); } else { mModePicker = (ModePicker) findViewById(R.id.mode_picker); mModePicker.setVisibility(View.VISIBLE); @@ -1954,42 +1953,27 @@ public class Camera extends ActivityBase implements FocusManager.Listener, private void showPostCaptureAlert() { if (mIsImageCaptureIntent) { - if (Util.isTabletUI()) { - mShutterButton.setEnabled(false); - } else { - mShutterButton.setVisibility(View.GONE); - } + mShutterButton.setVisibility(View.GONE); + mIndicatorControlContainer.setVisibility(View.GONE); + int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { - View button = findViewById(id); - ((View) button.getParent()).setVisibility(View.VISIBLE); + Util.fadeIn(findViewById(id)); } - - // Remove the text of the cancel button - View view = findViewById(R.id.btn_cancel); - if (view instanceof Button) ((Button) view).setText(""); } } private void hidePostCaptureAlert() { if (mIsImageCaptureIntent) { - if (Util.isTabletUI()) { - mShutterButton.setEnabled(true); - } else { - mShutterButton.setVisibility(View.VISIBLE); - } + enableCameraControls(true); + int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { - View button = findViewById(id); - ((View) button.getParent()).setVisibility(View.GONE); + (findViewById(id)).setVisibility(View.GONE); } - enableCameraControls(true); - // Restore the text of the cancel button - View view = findViewById(R.id.btn_cancel); - if (view instanceof Button) { - ((Button) view).setText(R.string.review_cancel); - } + Util.fadeIn(mShutterButton); + Util.fadeIn(mIndicatorControlContainer); } } |