fix flipping camera

pull/1/head
Dylan McIntyre 8 years ago
parent 2e4effa0ac
commit 0a2a94245c
  1. 7
      camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java
  2. 1
      camerakit/src/main/java/com/flurgle/camerakit/CameraView.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()
);

@ -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);

Loading…
Cancel
Save