public PreviewScalingStrategy getPreviewScalingStrategy() {
        if (previewScalingStrategy != null) {
            return previewScalingStrategy;
        }

        // If we are using SurfaceTexture, it is safe to use centerCrop.
        // For SurfaceView, it's better to use fitCenter, otherwise the preview may overlap to
        // other views.
        if (textureView != null) {
            return new CenterCropStrategy();
        } else {
            return new FitCenterStrategy();
        }

    }
Override this to specify a different preview scaling strategy.
zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java