summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-11-07 18:36:31 +0800
committerAngus Kong <shkong@google.com>2011-11-07 18:36:31 +0800
commit219f0da6a5dec8dc20dff909fcb0bf549b6a1219 (patch)
treee954ee3ad4c8a5205a318645505f2b65074db5c5 /src/com/android/camera/VideoCamera.java
parent781528e1c86aa16d72694510898325d65e32c35b (diff)
downloadLegacyCamera-219f0da6a5dec8dc20dff909fcb0bf549b6a1219.zip
LegacyCamera-219f0da6a5dec8dc20dff909fcb0bf549b6a1219.tar.gz
LegacyCamera-219f0da6a5dec8dc20dff909fcb0bf549b6a1219.tar.bz2
Make dialog rotatable in Video mode.
bug:5575805 Change-Id: I6776f2b1d5a174a95ab40f8480110f0a34fb41e0
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 0b946c4..75cba44 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -151,6 +151,7 @@ public class VideoCamera extends ActivityBase
private int mSurfaceWidth;
private int mSurfaceHeight;
private View mReviewControl;
+ private RotateDialogController mRotateDialog;
private Toast mNoShareToast;
// An review image having same size as preview. It is displayed when
@@ -418,6 +419,8 @@ public class VideoCamera extends ActivityBase
mModePicker.setOnModeChangeListener(this);
}
+ mRotateDialog = new RotateDialogController(this, R.layout.rotate_dialog);
+
mPreviewPanel = findViewById(R.id.frame_layout);
mPreviewFrameLayout = (PreviewFrameLayout) findViewById(R.id.frame);
mReviewImage = (ImageView) findViewById(R.id.review_image);
@@ -569,7 +572,7 @@ public class VideoCamera extends ActivityBase
private void setOrientationIndicator(int orientation) {
Rotatable[] indicators = {mThumbnailView, mModePicker, mSharePopup,
mBgLearningMessageRotater, mIndicatorControlContainer,
- mReviewDoneButton, mReviewPlayButton, mReviewCancelButton};
+ mReviewDoneButton, mReviewPlayButton, mReviewCancelButton, mRotateDialog};
for (Rotatable indicator : indicators) {
if (indicator != null) indicator.setOrientation(orientation);
}
@@ -2048,10 +2051,11 @@ public class VideoCamera extends ActivityBase
restorePreferences();
}
};
- MenuHelper.confirmAction(this,
+ mRotateDialog.showAlertDialog(
getString(R.string.confirm_restore_title),
getString(R.string.confirm_restore_message),
- runnable);
+ getString(android.R.string.ok), runnable,
+ getString(android.R.string.cancel), null);
}
private void restorePreferences() {