FileDocCategorySizeDatePackage
AnimateableViewBounds.javaAPI DocAndroid 5.1 API2837Thu Mar 12 22:22:42 GMT 2015com.android.systemui.recents.views

AnimateableViewBounds

public class AnimateableViewBounds extends android.view.ViewOutlineProvider

Fields Summary
com.android.systemui.recents.RecentsConfiguration
mConfig
TaskView
mSourceView
android.graphics.Rect
mClipRect
android.graphics.Rect
mClipBounds
int
mCornerRadius
float
mAlpha
final float
mMinAlpha
Constructors Summary
public AnimateableViewBounds(TaskView source, int cornerRadius)


         
        mConfig = RecentsConfiguration.getInstance();
        mSourceView = source;
        mCornerRadius = cornerRadius;
        setClipBottom(getClipBottom());
    
Methods Summary
public intgetClipBottom()
Returns the bottom clip.

        return mClipRect.bottom;
    
public voidgetOutline(android.view.View view, android.graphics.Outline outline)

        outline.setAlpha(mMinAlpha + mAlpha / (1f - mMinAlpha));
        outline.setRoundRect(mClipRect.left, mClipRect.top,
                mSourceView.getWidth() - mClipRect.right,
                mSourceView.getHeight() - mClipRect.bottom,
                mCornerRadius);
    
voidsetAlpha(float alpha)
Sets the view outline alpha.

        if (Float.compare(alpha, mAlpha) != 0) {
            mAlpha = alpha;
            mSourceView.invalidateOutline();
        }
    
public voidsetClipBottom(int bottom)
Sets the bottom clip.

        if (bottom != mClipRect.bottom) {
            mClipRect.bottom = bottom;
            mSourceView.invalidateOutline();
            updateClipBounds();
            if (!mConfig.useHardwareLayers) {
                mSourceView.mThumbnailView.updateThumbnailVisibility(
                        bottom - mSourceView.getPaddingBottom());
            }
        }
    
private voidupdateClipBounds()

        mClipBounds.set(mClipRect.left, mClipRect.top,
                mSourceView.getWidth() - mClipRect.right,
                mSourceView.getHeight() - mClipRect.bottom);
        mSourceView.setClipBounds(mClipBounds);