@Override
    public void draw(@NonNull Canvas canvas) {
        final boolean positionChanged = adapterPositionChanged();
        if (rippleOverlay) {
            super.draw(canvas);
            if (!positionChanged) {
                if (rippleRoundedCornersPx != 0) {
                    Path clipPath = new Path();
                    RectF rect = new RectF(0, 0, canvas.getWidth(), canvas.getHeight());
                    clipPath.addRoundRect(rect, rippleRoundedCornersPx, rippleRoundedCornersPx, Path.Direction.CW);
                    canvas.clipPath(clipPath);
                }
                canvas.drawCircle(currentCoordinates.x, currentCoordinates.y, radius, paint);
            }
        } else {
            if (!positionChanged) {
                canvas.drawCircle(currentCoordinates.x, currentCoordinates.y, radius, paint);
            }
            super.draw(canvas);
        }
    }
@ Override public void draw ( @ NonNull Canvas canvas ) { final boolean positionChanged = adapterPositionChanged ( ) ; if ( rippleOverlay ) { super . draw ( canvas ) ; if ( ! positionChanged ) { if ( rippleRoundedCornersPx != 0 ) { Path clipPath = new Path ( ) ; RectF rect = new RectF ( 0 , 0 , canvas . getWidth ( ) , canvas . getHeight ( ) ) ; clipPath . addRoundRect ( rect , rippleRoundedCornersPx , rippleRoundedCornersPx , Path . Direction . CW ) ; canvas . clipPath ( clipPath ) ; } canvas . drawCircle ( currentCoordinates . x , currentCoordinates . y , radius , paint ) ; } } else { if ( ! positionChanged ) { canvas . drawCircle ( currentCoordinates . x , currentCoordinates . y , radius , paint ) ; } super . draw ( canvas ) ; } }
Drawing