MaterialRippleLayout.java 文件源码

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

项目:boohee_v5.6 作者:
public void draw(Canvas canvas) {
    boolean positionChanged = adapterPositionChanged();
    if (this.rippleOverlay) {
        if (!positionChanged) {
            this.rippleBackground.draw(canvas);
        }
        super.draw(canvas);
        if (!positionChanged) {
            if (this.rippleRoundedCorners != 0.0f) {
                Path clipPath = new Path();
                clipPath.addRoundRect(new RectF(0.0f, 0.0f, (float) canvas.getWidth(), (float) canvas.getHeight()), this.rippleRoundedCorners, this.rippleRoundedCorners, Direction.CW);
                canvas.clipPath(clipPath);
            }
            canvas.drawCircle((float) this.currentCoords.x, (float) this.currentCoords.y, this.radius, this.paint);
            return;
        }
        return;
    }
    if (!positionChanged) {
        this.rippleBackground.draw(canvas);
        canvas.drawCircle((float) this.currentCoords.x, (float) this.currentCoords.y, this.radius, this.paint);
    }
    super.draw(canvas);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号