private void previewSized(Size size) {
        this.previewSize = size;
        if (containerSize != null) {
            calculateFrames();
            requestLayout();
            startPreviewIfReady();
        }
    }
Override this to specify a different preview scaling strategy.
zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java