leanback/src/main/java/androidx/leanback/widget/ShadowOverlayContainer.java
void initialize(int shadowType, boolean hasColorDimOverlay, int roundedCornerRadius) {
        if (mInitialized) {
            throw new IllegalStateException();
        }
        mInitialized = true;
        mRoundedCornerRadius = roundedCornerRadius;
        mRoundedCorners = roundedCornerRadius > 0;
        mShadowType = shadowType;
        switch (mShadowType) {
            case SHADOW_DYNAMIC:
                mShadowImpl = ShadowHelper.addDynamicShadow(
                        this, mUnfocusedZ, mFocusedZ, mRoundedCornerRadius);
                break;
            case SHADOW_STATIC:
                mShadowImpl = StaticShadowHelper.addStaticShadow(this);
                break;
        }
        if (hasColorDimOverlay) {
            setWillNotDraw(false);
            mOverlayColor = Color.TRANSPARENT;
            mOverlayPaint = new Paint();
            mOverlayPaint.setColor(mOverlayColor);
            mOverlayPaint.setStyle(Paint.Style.FILL);
        } else {
            setWillNotDraw(true);
            mOverlayPaint = null;
        }
    }
/**
     * Initialize shadows, color overlay, and rounded corners.  All are optional.
     */
Initialize shadows, color overlay, and rounded corners.  All are optional.
Initialize shadows color overlay and rounded corners . All are optional .
void initialize(int shadowType, boolean hasColorDimOverlay, int roundedCornerRadius) {
        if (mInitialized) {
            throw new IllegalStateException();
        }
        mInitialized = true;
        mRoundedCornerRadius = roundedCornerRadius;
        mRoundedCorners = roundedCornerRadius > 0;
        mShadowType = shadowType;
        switch (mShadowType) {
            case SHADOW_DYNAMIC:
                mShadowImpl = ShadowHelper.addDynamicShadow(
                        this, mUnfocusedZ, mFocusedZ, mRoundedCornerRadius);
                break;
            case SHADOW_STATIC:
                mShadowImpl = StaticShadowHelper.addStaticShadow(this);
                break;
        }
        if (hasColorDimOverlay) {
            setWillNotDraw(false);
            mOverlayColor = Color.TRANSPARENT;
            mOverlayPaint = new Paint();
            mOverlayPaint.setColor(mOverlayColor);
            mOverlayPaint.setStyle(Paint.Style.FILL);
        } else {
            setWillNotDraw(true);
            mOverlayPaint = null;
        }
    }
void initialize ( int shadowType , boolean hasColorDimOverlay , int roundedCornerRadius ) { if ( mInitialized ) { throw new IllegalStateException ( ) ; } mInitialized = true ; mRoundedCornerRadius = roundedCornerRadius ; mRoundedCorners = roundedCornerRadius > 0 ; mShadowType = shadowType ; switch ( mShadowType ) { case SHADOW_DYNAMIC : mShadowImpl = ShadowHelper . addDynamicShadow ( this , mUnfocusedZ , mFocusedZ , mRoundedCornerRadius ) ; break ; case SHADOW_STATIC : mShadowImpl = StaticShadowHelper . addStaticShadow ( this ) ; break ; } if ( hasColorDimOverlay ) { setWillNotDraw ( false ) ; mOverlayColor = Color . TRANSPARENT ; mOverlayPaint = new Paint ( ) ; mOverlayPaint . setColor ( mOverlayColor ) ; mOverlayPaint . setStyle ( Paint . Style . FILL ) ; } else { setWillNotDraw ( true ) ; mOverlayPaint = null ; } }
Initialize shadows, color overlay, and rounded corners.
Initialize shadows color overlay and rounded corners .