diff options
-rw-r--r-- | res/layout/panorama_module.xml | 29 | ||||
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaUI.java | 14 |
2 files changed, 36 insertions, 7 deletions
diff --git a/res/layout/panorama_module.xml b/res/layout/panorama_module.xml index 581170f07..db05b806c 100644 --- a/res/layout/panorama_module.xml +++ b/res/layout/panorama_module.xml @@ -25,6 +25,35 @@ android:layout_height="match_parent" android:background="@android:color/black" android:visibility="gone" /> + + <com.android.camera.ui.RotateLayout + android:id="@+id/waitingDialog" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" > + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@color/pano_progress_empty" + android:orientation="horizontal" + android:padding="10dp" > + + <ProgressBar + style="@android:attr/progressBarStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginRight="12dp" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:text="@string/pano_dialog_prepare_preview" /> + </LinearLayout> + </com.android.camera.ui.RotateLayout> + <include layout="@layout/pano_module_review" /> <include layout="@layout/camera_controls" android:layout_gravity="center" diff --git a/src/com/android/camera/WideAnglePanoramaUI.java b/src/com/android/camera/WideAnglePanoramaUI.java index e270165c1..230c31c86 100644 --- a/src/com/android/camera/WideAnglePanoramaUI.java +++ b/src/com/android/camera/WideAnglePanoramaUI.java @@ -49,6 +49,7 @@ import android.widget.TextView; import com.android.camera.ui.CameraControls; import com.android.camera.ui.CameraRootView; import com.android.camera.ui.ModuleSwitcher; +import com.android.camera.ui.RotateLayout; import com.android.camera.ui.RotateTextToast; import com.android.camera.util.CameraUtil; import org.codeaurora.snapcam.R; @@ -101,6 +102,7 @@ public class WideAnglePanoramaUI implements private int mOrientation; private int mPreviewYOffset; + private RotateLayout mWaitingDialog; /** Constructor. */ public WideAnglePanoramaUI( @@ -459,6 +461,7 @@ public class WideAnglePanoramaUI implements mCameraControls = (CameraControls) mRootView.findViewById(R.id.camera_controls); setPanoramaPreviewView(); + mWaitingDialog = (RotateLayout) mRootView.findViewById(R.id.waitingDialog); mDialogHelper = new DialogHelper(); setViews(appRes); } @@ -533,11 +536,9 @@ public class WideAnglePanoramaUI implements } private class DialogHelper { - private ProgressDialog mProgressDialog; private AlertDialog mAlertDialog; DialogHelper() { - mProgressDialog = null; mAlertDialog = null; } @@ -546,9 +547,8 @@ public class WideAnglePanoramaUI implements mAlertDialog.dismiss(); mAlertDialog = null; } - if (mProgressDialog != null) { - mProgressDialog.dismiss(); - mProgressDialog = null; + if (mWaitingDialog != null) { + mWaitingDialog.setVisibility(View.INVISIBLE); } } @@ -570,7 +570,7 @@ public class WideAnglePanoramaUI implements public void showWaitingDialog(CharSequence message) { dismissAll(); - mProgressDialog = ProgressDialog.show(mActivity, null, message, true, false); + mWaitingDialog.setVisibility(View.VISIBLE); } } @@ -683,7 +683,7 @@ public class WideAnglePanoramaUI implements FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) button.getLayoutParams(); lp.gravity = g; button.setLayoutParams(lp); - + mWaitingDialog.setRotation(-orientation); mReview.setRotation(-orientation); mTooFastPrompt.setRotation(-orientation); mCameraControls.setOrientation(orientation, animation); |