library/src/main/java/com/devbrackets/android/exomedia/core/video/scale/MatrixManager.java
public boolean scale(@NonNull TextureView view, @NonNull ScaleType scaleType) {
        if (intrinsicVideoSize.x == 0 || intrinsicVideoSize.y == 0) {
            Log.d(TAG, "Unable to apply scale with an intrinsic video size of " + intrinsicVideoSize.toString());
            return false;
        }

        if (view.getHeight() == 0 || view.getWidth() == 0) {
            Log.d(TAG, "Unable to apply scale with a view size of (" + view.getWidth() + ", " + view.getHeight() + ")");
            return false;
        }

        Matrix transformMatrix = new Matrix();
        view.getTransform(transformMatrix);
        switch (scaleType) {
            case CENTER:
                applyCenter(view, transformMatrix);
                break;
            case CENTER_CROP:
                applyCenterCrop(view, transformMatrix);
                break;
            case CENTER_INSIDE:
                applyCenterInside(view, transformMatrix);
                break;
            case FIT_CENTER:
                applyFitCenter(view, transformMatrix);
                break;
            case NONE:
                transformMatrix.setScale(1, 1);
                break;
        }

        view.setTransform(transformMatrix);
        return true;
    }
/**
     * Performs the requested scaling on the <code>view</code>'s matrix
     *
     * @param view The TextureView to alter the matrix to achieve the requested scale type
     * @param scaleType The type of scaling to use for the specified view
     * @return True if the scale was applied
     */
Performs the requested scaling on the view's matrix
@param view The TextureView to alter the matrix to achieve the requested scale type
@param scaleType The type of scaling to use for the specified view
@return True if the scale was applied
Performs the requested scaling on the view ' s matrix @param view The TextureView to alter the matrix to achieve the requested scale type @param scaleType The type of scaling to use for the specified view @return True if the scale was applied
public boolean scale(@NonNull TextureView view, @NonNull ScaleType scaleType) {
        if (intrinsicVideoSize.x == 0 || intrinsicVideoSize.y == 0) {
            Log.d(TAG, "Unable to apply scale with an intrinsic video size of " + intrinsicVideoSize.toString());
            return false;
        }
        if (view.getHeight() == 0 || view.getWidth() == 0) {
            Log.d(TAG, "Unable to apply scale with a view size of (" + view.getWidth() + ", " + view.getHeight() + ")");
            return false;
        }
        Matrix transformMatrix = new Matrix();
        view.getTransform(transformMatrix);
        switch (scaleType) {
            case CENTER:
                applyCenter(view, transformMatrix);
                break;
            case CENTER_CROP:
                applyCenterCrop(view, transformMatrix);
                break;
            case CENTER_INSIDE:
                applyCenterInside(view, transformMatrix);
                break;
            case FIT_CENTER:
                applyFitCenter(view, transformMatrix);
                break;
            case NONE:
                transformMatrix.setScale(1, 1);
                break;
        }
        view.setTransform(transformMatrix);
        return true;
    }
public boolean scale ( @ NonNull TextureView view , @ NonNull ScaleType scaleType ) { if ( intrinsicVideoSize . x == 0 || intrinsicVideoSize . y == 0 ) { Log . d ( TAG , "Unable to apply scale with an intrinsic video size of " + intrinsicVideoSize . toString ( ) ) ; return false ; } if ( view . getHeight ( ) == 0 || view . getWidth ( ) == 0 ) { Log . d ( TAG , "Unable to apply scale with a view size of (" + view . getWidth ( ) + ", " + view . getHeight ( ) + ")" ) ; return false ; } Matrix transformMatrix = new Matrix ( ) ; view . getTransform ( transformMatrix ) ; switch ( scaleType ) { case CENTER : applyCenter ( view , transformMatrix ) ; break ; case CENTER_CROP : applyCenterCrop ( view , transformMatrix ) ; break ; case CENTER_INSIDE : applyCenterInside ( view , transformMatrix ) ; break ; case FIT_CENTER : applyFitCenter ( view , transformMatrix ) ; break ; case NONE : transformMatrix . setScale ( 1 , 1 ) ; break ; } view . setTransform ( transformMatrix ) ; return true ; }
Performs the requested scaling on the <code>view</code>'s matrix
 @param view The TextureView to alter the matrix to achieve the requested scale type
 @param scaleType The type of scaling to use for the specified view
 @return True if the scale was applied
Performs the requested scaling on the <code > view< / code > ' s matrix @param view The TextureView to alter the matrix to achieve the requested scale type @param scaleType The type of scaling to use for the specified view @return True if the scale was applied