RippleDrawable.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:Material-Components 作者:
@Override
protected void onBoundsChange(Rect bounds) {        
    if(mBackgroundDrawable != null)
        mBackgroundDrawable.setBounds(bounds);

    mBackgroundBounds.set(bounds.left + mMask.left, bounds.top + mMask.top, bounds.right - mMask.right, bounds.bottom - mMask.bottom);
    mBackground.reset();

    switch (mMask.type) {
        case Mask.TYPE_OVAL:
            mBackground.addOval(mBackgroundBounds, Direction.CW);
            break;
        case Mask.TYPE_RECTANGLE:
            mBackground.addRoundRect(mBackgroundBounds, mMask.cornerRadius, Direction.CW);
            break;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号