fix #130, make sure the preview is zoomed out at camera init

This commit is contained in:
tibbi 2018-05-15 21:44:50 +02:00
parent e2ae2caf11
commit 43b399d552
1 changed files with 3 additions and 1 deletions

View File

@ -165,10 +165,12 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
}
val focusModes = mParameters!!.supportedFocusModes
if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE))
if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) {
mParameters!!.focusMode = Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE
}
mCamera!!.setDisplayOrientation(mActivity!!.getPreviewRotation(mCurrCameraId))
mParameters!!.zoom = 0
updateCameraParameters()
if (mCanTakePicture) {