diff --git a/res/layout/camera.xml b/res/layout/camera.xml
index 939007a..19ce5f1 100644
--- a/res/layout/camera.xml
+++ b/res/layout/camera.xml
@@ -15,7 +15,6 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
         android:id="@+id/app_root"
         android:orientation="vertical"
         android:layout_width="match_parent"
diff --git a/res/layout/panorama.xml b/res/layout/panorama.xml
index d56cca0..1ff7601 100644
--- a/res/layout/panorama.xml
+++ b/res/layout/panorama.xml
@@ -22,5 +22,4 @@
 
     <include layout="@layout/pano_capture" />
     <include layout="@layout/pano_review" />
-    <include layout="@layout/pano_rotate_dialog" />
 </RelativeLayout>
diff --git a/res/layout/pano_rotate_dialog.xml b/res/layout/rotate_dialog.xml
similarity index 76%
rename from res/layout/pano_rotate_dialog.xml
rename to res/layout/rotate_dialog.xml
index 456bb02..3ca5283 100644
--- a/res/layout/pano_rotate_dialog.xml
+++ b/res/layout/rotate_dialog.xml
@@ -15,13 +15,16 @@
 -->
 
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/rotate_dialog_root_layout"
+        android:clickable="true"
         android:gravity="center"
+        android:visibility="gone"
+        android:background="#55000000"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
     <com.android.camera.ui.RotateLayout
             android:id="@+id/rotate_dialog_layout"
-            android:visibility="gone"
             android:gravity="center"
             android:layout_gravity="center"
             android:layout_width="wrap_content"
@@ -87,16 +90,31 @@
                         android:showDividers="beginning"
                         android:dividerPadding="0dip">
 
-                    <Button android:id="@+id/rotate_dialog_button"
-                            style="@android:style/Widget.Holo.Button.Borderless"
-                            android:gravity="center"
-                            android:text="@string/review_ok"
-                            android:maxLines="2"
-                            android:minHeight="48dp"
-                            android:textSize="14sp"
-                            android:onClick="onAlertDialogButtonClicked"
+                    <LinearLayout
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content" />
+                            android:layout_height="wrap_content"
+                            android:gravity="center"
+                            android:orientation="horizontal">
+
+                        <Button android:id="@+id/rotate_dialog_button2"
+                                style="@android:style/Widget.Holo.Button.Borderless"
+                                android:gravity="center"
+                                android:maxLines="2"
+                                android:minHeight="48dp"
+                                android:textSize="14sp"
+                                android:layout_weight="1"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content" />
+                        <Button android:id="@+id/rotate_dialog_button1"
+                                style="@android:style/Widget.Holo.Button.Borderless"
+                                android:gravity="center"
+                                android:maxLines="2"
+                                android:minHeight="48dp"
+                                android:textSize="14sp"
+                                android:layout_weight="1"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content" />
+                    </LinearLayout>
                 </LinearLayout>
             </LinearLayout>
         </FrameLayout>
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 1bd759b..b0f376a 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -63,6 +63,7 @@
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.WindowManager;
 import android.view.animation.AnimationUtils;
 import android.widget.TextView;
@@ -146,6 +147,7 @@
     private View mPreviewPanel;  // The container of PreviewFrameLayout.
     private PreviewFrameLayout mPreviewFrameLayout;
     private View mPreviewFrame;  // Preview frame area.
+    private RotateDialogController mRotateDialog;
 
     // A popup window that contains a bigger thumbnail and a list of apps to share.
     private SharePopup mSharePopup;
@@ -189,7 +191,7 @@
      *
      * TODO: consider publishing by moving into MediaStore.
      */
-    private final static String EXTRA_QUICK_CAPTURE =
+    private static final String EXTRA_QUICK_CAPTURE =
             "android.intent.extra.quickCapture";
 
     // The display rotation in degrees. This is only valid when mCameraState is
@@ -1052,6 +1054,8 @@
             mThumbnailView.setVisibility(View.VISIBLE);
         }
 
+        mRotateDialog = new RotateDialogController(this, R.layout.rotate_dialog);
+
         mPreferences.setLocalId(this, mCameraId);
         CameraSettings.upgradeLocalPreferences(mPreferences.getLocal());
 
@@ -1225,7 +1229,7 @@
     private void setOrientationIndicator(int orientation) {
         Rotatable[] indicators = {mThumbnailView, mModePicker, mSharePopup,
                 mIndicatorControlContainer, mZoomControl, mFocusIndicator, mFaceView,
-                mReviewCancelButton, mReviewDoneButton};
+                mReviewCancelButton, mReviewDoneButton, mRotateDialog};
         for (Rotatable indicator : indicators) {
             if (indicator != null) indicator.setOrientation(orientation);
         }
@@ -2161,10 +2165,11 @@
                 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() {
diff --git a/src/com/android/camera/RotateDialogController.java b/src/com/android/camera/RotateDialogController.java
new file mode 100644
index 0000000..d91ba13
--- /dev/null
+++ b/src/com/android/camera/RotateDialogController.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.camera;
+
+import com.android.camera.ui.Rotatable;
+import com.android.camera.ui.RotateLayout;
+
+import android.app.Activity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.Button;
+import android.widget.TextView;
+import android.widget.ProgressBar;
+
+public class RotateDialogController implements Rotatable {
+
+    private static final String TAG = "RotateDialogController";
+    private static final long ANIM_DURATION = 150;  // millis
+
+    private Activity mActivity;
+    private int mLayoutResourceID;
+    private View mDialogRootLayout;
+    private RotateLayout mRotateDialog;
+    private View mRotateDialogTitleLayout;
+    private View mRotateDialogButtonLayout;
+    private TextView mRotateDialogTitle;
+    private ProgressBar mRotateDialogSpinner;
+    private TextView mRotateDialogText;
+    private TextView mRotateDialogButton1;
+    private TextView mRotateDialogButton2;
+
+    private Animation mFadeInAnim, mFadeOutAnim;
+
+    public RotateDialogController(Activity a, int layoutResource) {
+        mActivity = a;
+        mLayoutResourceID = layoutResource;
+    }
+
+    private void inflateDialogLayout() {
+        if (mDialogRootLayout == null) {
+            ViewGroup layoutRoot = (ViewGroup) mActivity.getWindow().getDecorView();
+            LayoutInflater inflater = mActivity.getLayoutInflater();
+            View v = inflater.inflate(mLayoutResourceID, layoutRoot);
+            mDialogRootLayout = v.findViewById(R.id.rotate_dialog_root_layout);
+            mRotateDialog = (RotateLayout) v.findViewById(R.id.rotate_dialog_layout);
+            mRotateDialogTitleLayout = v.findViewById(R.id.rotate_dialog_title_layout);
+            mRotateDialogButtonLayout = v.findViewById(R.id.rotate_dialog_button_layout);
+            mRotateDialogTitle = (TextView) v.findViewById(R.id.rotate_dialog_title);
+            mRotateDialogSpinner = (ProgressBar) v.findViewById(R.id.rotate_dialog_spinner);
+            mRotateDialogText = (TextView) v.findViewById(R.id.rotate_dialog_text);
+            mRotateDialogButton1 = (Button) v.findViewById(R.id.rotate_dialog_button1);
+            mRotateDialogButton2 = (Button) v.findViewById(R.id.rotate_dialog_button2);
+
+            mFadeInAnim = AnimationUtils.loadAnimation(
+                    mActivity, android.R.anim.fade_in);
+            mFadeOutAnim = AnimationUtils.loadAnimation(
+                    mActivity, android.R.anim.fade_out);
+            mFadeInAnim.setDuration(ANIM_DURATION);
+            mFadeOutAnim.setDuration(ANIM_DURATION);
+        }
+    }
+
+    @Override
+    public void setOrientation(int orientation) {
+        inflateDialogLayout();
+        mRotateDialog.setOrientation(orientation);
+    }
+
+    public void resetRotateDialog() {
+        inflateDialogLayout();
+        mRotateDialogTitleLayout.setVisibility(View.GONE);
+        mRotateDialogSpinner.setVisibility(View.GONE);
+        mRotateDialogButton1.setVisibility(View.GONE);
+        mRotateDialogButton2.setVisibility(View.GONE);
+        mRotateDialogButtonLayout.setVisibility(View.GONE);
+    }
+
+    private void fadeOutDialog() {
+        mDialogRootLayout.startAnimation(mFadeOutAnim);
+        mDialogRootLayout.setVisibility(View.GONE);
+    }
+
+    private void fadeInDialog() {
+        mDialogRootLayout.startAnimation(mFadeInAnim);
+        mDialogRootLayout.setVisibility(View.VISIBLE);
+    }
+
+    public void dismissDialog() {
+        if (mDialogRootLayout != null && mDialogRootLayout.getVisibility() != View.GONE) {
+            fadeOutDialog();
+        }
+    }
+
+    public void showAlertDialog(String title, String msg, String button1Text,
+                final Runnable r1, String button2Text, final Runnable r2) {
+        resetRotateDialog();
+
+        mRotateDialogTitle.setText(title);
+        mRotateDialogTitleLayout.setVisibility(View.VISIBLE);
+
+        mRotateDialogText.setText(msg);
+
+        if (button1Text != null) {
+            mRotateDialogButton1.setText(button1Text);
+            mRotateDialogButton1.setVisibility(View.VISIBLE);
+            mRotateDialogButton1.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (r1 != null) r1.run();
+                    dismissDialog();
+                }
+            });
+            mRotateDialogButtonLayout.setVisibility(View.VISIBLE);
+        }
+        if (button2Text != null) {
+            mRotateDialogButton2.setText(button2Text);
+            mRotateDialogButton2.setVisibility(View.VISIBLE);
+            mRotateDialogButton2.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (r2 != null) r2.run();
+                    dismissDialog();
+                }
+            });
+            mRotateDialogButtonLayout.setVisibility(View.VISIBLE);
+        }
+
+        fadeInDialog();
+    }
+
+    public void showWaitingDialog(String msg) {
+        resetRotateDialog();
+
+        mRotateDialogText.setText(msg);
+        mRotateDialogSpinner.setVisibility(View.VISIBLE);
+
+        fadeInDialog();
+    }
+
+}
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java
index ab220de..98490e5 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -25,6 +25,7 @@
 import com.android.camera.ModePicker;
 import com.android.camera.OnClickAttr;
 import com.android.camera.R;
+import com.android.camera.RotateDialogController;
 import com.android.camera.ShutterButton;
 import com.android.camera.SoundPlayer;
 import com.android.camera.Storage;
@@ -35,11 +36,8 @@
 import com.android.camera.ui.RotateLayout;
 import com.android.camera.ui.SharePopup;
 
-import android.app.Dialog;
-import android.app.ProgressDialog;
 import android.content.ContentResolver;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.res.AssetFileDescriptor;
 import android.content.pm.ActivityInfo;
 import android.content.res.Resources;
@@ -50,7 +48,6 @@
 import android.graphics.Rect;
 import android.graphics.SurfaceTexture;
 import android.graphics.YuvImage;
-import android.hardware.Camera;
 import android.hardware.Camera.Parameters;
 import android.hardware.Camera.Size;
 import android.hardware.Sensor;
@@ -63,23 +60,18 @@
 import android.os.SystemProperties;
 import android.util.Log;
 import android.view.Gravity;
-import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.OrientationEventListener;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager;
-import android.widget.Button;
 import android.widget.ImageView;
-import android.widget.ProgressBar;
 import android.widget.TextView;
 
 import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
 import java.io.File;
 import java.util.List;
-import java.util.Vector;
 
 /**
  * Activity to handle panorama capturing.
@@ -131,15 +123,6 @@
     private ShutterButton mShutterButton;
     private Object mWaitObject = new Object();
 
-    private RotateLayout mRotateDialog;
-    private View mRotateDialogTitleLayout;
-    private View mRotateDialogButtonLayout;
-    private TextView mRotateDialogTitle;
-    private View mRotateDialogTitleSeperator;
-    private ProgressBar mRotateDialogSpinner;
-    private TextView mRotateDialogText;
-    private TextView mRotateDialogButton;
-
     private String mPreparePreviewString;
     private String mDialogTitle;
     private String mDialogOkString;
@@ -196,6 +179,8 @@
     private int mDeviceOrientation;
     private int mOrientationCompensation;
 
+    private RotateDialogController mRotateDialog;
+
     private class MosaicJpeg {
         public MosaicJpeg(byte[] data, int width, int height) {
             this.data = data;
@@ -316,8 +301,14 @@
                         if (mPausing) {
                             resetToPreview();
                         } else {
-                            showAlertDialog(
-                                    mDialogTitle, mDialogPanoramaFailedString, mDialogOkString);
+                            mRotateDialog.showAlertDialog(
+                                    mDialogTitle, mDialogPanoramaFailedString,
+                                    mDialogOkString, new Runnable() {
+                                        @Override
+                                        public void run() {
+                                            resetToPreview();
+                                        }},
+                                    null, null);
                         }
                         break;
                     case MSG_RESET_TO_PREVIEW:
@@ -334,12 +325,6 @@
         };
     }
 
-    @OnClickAttr
-    public void onAlertDialogButtonClicked(View v) {
-        dismissDialog();
-        resetToPreview();
-    }
-
     private void setupCamera() {
         openCamera();
         Parameters parameters = mCameraDevice.getParameters();
@@ -604,7 +589,7 @@
         mSurfaceTexture.setOnFrameAvailableListener(null);
 
         if (!aborted && !mThreadRunning) {
-            showWaitingDialog(mPreparePreviewString);
+            mRotateDialog.showWaitingDialog(mPreparePreviewString);
             runBackgroundThread(new Thread() {
                 @Override
                 public void run() {
@@ -716,14 +701,7 @@
 
         mPanoLayout = findViewById(R.id.pano_layout);
 
-        mRotateDialog = (RotateLayout) findViewById(R.id.rotate_dialog_layout);
-        mRotateDialogTitleLayout = findViewById(R.id.rotate_dialog_title_layout);
-        mRotateDialogButtonLayout = findViewById(R.id.rotate_dialog_button_layout);
-        mRotateDialogTitle = (TextView) findViewById(R.id.rotate_dialog_title);
-        mRotateDialogTitleSeperator = (View) findViewById(R.id.rotate_dialog_title_divider);
-        mRotateDialogSpinner = (ProgressBar) findViewById(R.id.rotate_dialog_spinner);
-        mRotateDialogText = (TextView) findViewById(R.id.rotate_dialog_text);
-        mRotateDialogButton = (Button) findViewById(R.id.rotate_dialog_button);
+        mRotateDialog = new RotateDialogController(this, R.layout.rotate_dialog);
 
         if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
             Rotatable[] rotateLayout = {
@@ -845,41 +823,6 @@
         reportProgress();
     }
 
-    private void resetRotateDialog() {
-        mRotateDialogTitleLayout.setVisibility(View.GONE);
-        mRotateDialogSpinner.setVisibility(View.GONE);
-        mRotateDialogButtonLayout.setVisibility(View.GONE);
-    }
-
-    private void dismissDialog() {
-        if (mRotateDialog.getVisibility() != View.INVISIBLE) {
-            mRotateDialog.setVisibility(View.INVISIBLE);
-        }
-    }
-
-    private void showAlertDialog(String title, String msg, String buttonText) {
-        resetRotateDialog();
-
-        mRotateDialogTitle.setText(title);
-        mRotateDialogTitleLayout.setVisibility(View.VISIBLE);
-
-        mRotateDialogText.setText(msg);
-
-        mRotateDialogButton.setText(buttonText);
-        mRotateDialogButtonLayout.setVisibility(View.VISIBLE);
-
-        mRotateDialog.setVisibility(View.VISIBLE);
-    }
-
-    private void showWaitingDialog(String msg) {
-        resetRotateDialog();
-
-        mRotateDialogText.setText(msg);
-        mRotateDialogSpinner.setVisibility(View.VISIBLE);
-
-        mRotateDialog.setVisibility(View.VISIBLE);
-    }
-
     private void runBackgroundThread(Thread thread) {
         mThreadRunning = true;
         thread.start();
@@ -887,7 +830,7 @@
 
     private void onBackgroundThreadFinished() {
         mThreadRunning = false;
-        dismissDialog();
+        mRotateDialog.dismissDialog();
     }
 
     private void cancelHighResComputation() {
