RippleEffect

interface RippleEffect
androidx.ui.material.ripple.RippleEffect

RippleEffects are drawn as part of Ripple as a visual indicator for a pressed state.

Use Ripple to add an animation for your component.

Summary

Public methods

abstract Unit

Free up the resources associated with this ripple.

abstract Unit
draw(canvas: Canvas, color: Color)

Override this method to draw the ripple.

abstract Unit
finish(canceled: Boolean)

Called when the user input that triggered this effect was confirmed or canceled.

Public methods

dispose

abstract fun dispose(): Unit

Free up the resources associated with this ripple.

draw

abstract fun draw(
    canvas: Canvas,
    color: Color
): Unit

Override this method to draw the ripple.

Parameters
canvas: Canvas The Canvas to draw on.
color: Color The Color for this RippleEffect.

finish

abstract fun finish(canceled: Boolean): Unit

Called when the user input that triggered this effect was confirmed or canceled.

Typically causes the ripple to start disappearance animation.