diff options
-rw-r--r-- | res/layout/pano_capture.xml | 9 | ||||
-rw-r--r-- | src/com/android/camera/panorama/CaptureView.java | 6 | ||||
-rw-r--r-- | src/com/android/camera/panorama/PanoramaActivity.java | 18 |
3 files changed, 12 insertions, 21 deletions
diff --git a/res/layout/pano_capture.xml b/res/layout/pano_capture.xml index 39dd1ab..475e29e 100644 --- a/res/layout/pano_capture.xml +++ b/res/layout/pano_capture.xml @@ -24,15 +24,16 @@ <FrameLayout android:gravity="center" android:layout_width="match_parent" android:layout_height="match_parent"> - <com.android.camera.panorama.CaptureView - android:id="@+id/pano_capture_view" - android:layout_width="match_parent" - android:layout_height="match_parent" /> <com.android.camera.panorama.MosaicRendererSurfaceView android:id="@+id/pano_renderer" android:layout_gravity="center" android:layout_width="@dimen/pano_mosaic_surface_width" android:layout_height="@dimen/pano_mosaic_surface_height" /> + <com.android.camera.panorama.CaptureView + android:id="@+id/pano_capture_view" + android:visibility="gone" + android:layout_width="match_parent" + android:layout_height="match_parent" /> </FrameLayout> <ImageView style="@style/PanoViewHorizontalGrayBar" diff --git a/src/com/android/camera/panorama/CaptureView.java b/src/com/android/camera/panorama/CaptureView.java index 37f46bb..eea3043 100644 --- a/src/com/android/camera/panorama/CaptureView.java +++ b/src/com/android/camera/panorama/CaptureView.java @@ -50,12 +50,6 @@ class CaptureView extends View { Log.v(TAG, "onSizeChanged: W = " + w + ", H = " + h); } - public void onResume() { - } - - public void onPause() { - } - public void setStartAngle(int angle) { mStartAngle = angle; } diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index bb23b65..f383b4d 100644 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -312,6 +312,7 @@ public class PanoramaActivity extends Activity implements }); mStopCaptureButton.setVisibility(View.VISIBLE); + mCaptureView.setVisibility(View.VISIBLE); mRealTimeMosaicView.setVisibility(View.VISIBLE); mPanoControlLayout.setVisibility(View.GONE); @@ -368,24 +369,20 @@ 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); - + mRealTimeMosaicView = (MosaicRendererSurfaceView) findViewById(R.id.pano_renderer); + mRealTimeMosaicView.getRenderer().setMosaicSurfaceCreateListener(this); mCaptureView = (CaptureView) findViewById(R.id.pano_capture_view); mCaptureView.setStartAngle(-DEFAULT_SWEEP_ANGLE / 2); - mReview = (ImageView) findViewById(R.id.pano_reviewarea); + mStopCaptureButton = (Button) findViewById(R.id.pano_capture_stop_button); - mRealTimeMosaicView = (MosaicRendererSurfaceView) findViewById(R.id.pano_renderer); - mRealTimeMosaicView.getRenderer().setMosaicSurfaceCreateListener(this); + mReviewLayout = (View) findViewById(R.id.pano_review_layout); + mReview = (ImageView) findViewById(R.id.pano_reviewarea); mPanoControlLayout = (View) findViewById(R.id.pano_control_layout); - mModePicker = (ModePicker) findViewById(R.id.mode_picker); mModePicker.setVisibility(View.VISIBLE); mModePicker.setOnModeChangeListener(this); mModePicker.setCurrentMode(ModePicker.MODE_PANORAMA); - - mRealTimeMosaicView.setVisibility(View.VISIBLE); } @OnClickAttr @@ -427,6 +424,7 @@ public class PanoramaActivity extends Activity implements mReviewLayout.setVisibility(View.GONE); mStopCaptureButton.setVisibility(View.GONE); + mCaptureView.setVisibility(View.GONE); mPanoControlLayout.setVisibility(View.VISIBLE); mCaptureLayout.setVisibility(View.VISIBLE); mMosaicFrameProcessor.reset(); @@ -480,7 +478,6 @@ public class PanoramaActivity extends Activity implements mPausing = true; mRealTimeMosaicView.onPause(); - mCaptureView.onPause(); mSensorManager.unregisterListener(mListener); clearMosaicFrameProcessorIfNeeded(); System.gc(); @@ -504,7 +501,6 @@ public class PanoramaActivity extends Activity implements // Camera must be initialized before MosaicFrameProcessor is initialized. The preview size // has to be decided by camera device. initMosaicFrameProcessorIfNeeded(); - mCaptureView.onResume(); mRealTimeMosaicView.onResume(); } |