diff --git a/camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java b/camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java index 0cab6593..119a333b 100644 --- a/camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java +++ b/camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java @@ -303,6 +303,9 @@ public class Camera1 extends CameraImpl { if (mCamera != null) { mCamera.release(); mCamera = null; + mCameraParameters = null; + mPreviewSize = null; + mCaptureSize = null; mCameraListener.onCameraClosed(); } } @@ -316,12 +319,12 @@ public class Camera1 extends CameraImpl { } private void adjustCameraParameters() { - mCameraParameters.setPreviewSize( + mPreview.setTruePreviewSize( getPreviewResolution().getWidth(), getPreviewResolution().getHeight() ); - mPreview.setTruePreviewSize( + mCameraParameters.setPreviewSize( getPreviewResolution().getWidth(), getPreviewResolution().getHeight() ); diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java b/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java index 20ff48a3..0f724826 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java +++ b/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java @@ -74,7 +74,6 @@ public class CameraView extends FrameLayout { mFocus = a.getInteger(R.styleable.CameraView_ckFocus, CameraKit.Defaults.DEFAULT_FOCUS); mMethod = a.getInteger(R.styleable.CameraView_ckMethod, CameraKit.Defaults.DEFAULT_METHOD); mZoom = a.getInteger(R.styleable.CameraView_ckZoom, CameraKit.Defaults.DEFAULT_ZOOM); - mJpegQuality = a.getInteger(R.styleable.CameraView_ckJpegQuality, CameraKit.Defaults.DEFAULT_JPEG_QUALITY); mCropOutput = a.getBoolean(R.styleable.CameraView_ckCropOutput, CameraKit.Defaults.DEFAULT_CROP_OUTPUT); mAdjustViewBounds = a.getBoolean(R.styleable.CameraView_android_adjustViewBounds, CameraKit.Defaults.DEFAULT_ADJUST_VIEW_BOUNDS);