From 60fc534ec8f68d95a486984cb396a2da0e200518 Mon Sep 17 00:00:00 2001 From: Angus Kong Date: Tue, 16 Aug 2011 15:37:28 +0800 Subject: Remove preview layout and adjust widget size. Since we now use GL to render the realtime preview, the original preview frame can be removed then. Also some widgets' size is adjusted. bug:5142002 Change-Id: I8da708bab63b107b39e9e87a4893506dec171910 --- src/com/android/camera/panorama/PanoramaActivity.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index 3fe9b5b..88406d6 100644 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -48,6 +48,7 @@ import android.util.Log; import android.view.SurfaceView; import android.view.View; import android.view.WindowManager; +import android.widget.Button; import android.widget.ImageView; import java.io.ByteArrayOutputStream; @@ -79,8 +80,8 @@ public class PanoramaActivity extends Activity implements private View mPanoControlLayout; private View mCaptureLayout; + private Button mStopCaptureButton; private View mReviewLayout; - private SurfaceView mPreview; private ImageView mReview; private CaptureView mCaptureView; private MosaicRendererSurfaceView mRealTimeMosaicView; @@ -313,8 +314,7 @@ public class PanoramaActivity extends Activity implements } }); - mCaptureLayout.setVisibility(View.VISIBLE); - mPreview.setVisibility(View.INVISIBLE); // will be re-used, invisible is better than gone. + mStopCaptureButton.setVisibility(View.VISIBLE); mRealTimeMosaicView.setVisibility(View.VISIBLE); mPanoControlLayout.setVisibility(View.GONE); @@ -371,10 +371,9 @@ public class PanoramaActivity extends Activity implements mCaptureState = CAPTURE_VIEWFINDER; mCaptureLayout = (View) findViewById(R.id.pano_capture_layout); + mStopCaptureButton = (Button) findViewById(R.id.pano_capture_stop_button); mReviewLayout = (View) findViewById(R.id.pano_review_layout); - mPreview = (SurfaceView) findViewById(R.id.pano_preview_view); - mCaptureView = (CaptureView) findViewById(R.id.pano_capture_view); mCaptureView.setStartAngle(-DEFAULT_SWEEP_ANGLE / 2); mReview = (ImageView) findViewById(R.id.pano_reviewarea); @@ -429,9 +428,9 @@ public class PanoramaActivity extends Activity implements mCaptureState = CAPTURE_VIEWFINDER; mReviewLayout.setVisibility(View.GONE); - mPreview.setVisibility(View.VISIBLE); + mStopCaptureButton.setVisibility(View.GONE); mPanoControlLayout.setVisibility(View.VISIBLE); - mCaptureLayout.setVisibility(View.GONE); + mCaptureLayout.setVisibility(View.VISIBLE); mMosaicFrameProcessor.reset(); mSurface.setOnFrameAvailableListener(this); @@ -446,7 +445,6 @@ public class PanoramaActivity extends Activity implements mReview.setImageBitmap(bitmap); } mCaptureLayout.setVisibility(View.GONE); - mPreview.setVisibility(View.INVISIBLE); mReviewLayout.setVisibility(View.VISIBLE); mCaptureView.setStatusText(""); mCaptureView.setSweepAngle(0); -- cgit v1.1