Open harshkanjariya opened 3 years ago
The order of the drawing is wrong in onDraw of SpotlightView, you have to flip the shape and effect draw like this:
if (currentTarget != null && currentShapeAnimator != null) {
currentTarget.shape.draw(
canvas = canvas,
point = currentTarget.anchor,
value = currentShapeAnimator.animatedValue as Float,
paint = shapePaint
)
}
if (currentTarget != null && currentEffectAnimator != null && currentShapeAnimator != null && !currentShapeAnimator.isRunning) {
currentTarget.effect.draw(
canvas = canvas,
point = currentTarget.anchor,
value = currentEffectAnimator.animatedValue as Float,
paint = effectPaint
)
}
ripple effect not working i have tried many times but not showing any animation.