The Developer Preview for Android 11 is now available; test it out and share your feedback.


interface RippleEffectFactory

An encapsulation of an RippleEffect constructor used by Ripple and RippleTheme.

Will be used as a theme parameter in RippleTheme.factory


Public methods

abstract RippleEffect
create(coordinates: LayoutCoordinates, startPosition: PxPosition, density: Density, radius: Dp?, clipped: Boolean, clock: AnimationClockObservable, requestRedraw: () -> Unit, onAnimationFinished: (RippleEffect) -> Unit)

The factory method.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Public methods


abstract fun create(
    coordinates: LayoutCoordinates,
    startPosition: PxPosition,
    density: Density,
    radius: Dp?,
    clipped: Boolean,
    clock: AnimationClockObservable,
    requestRedraw: () -> Unit,
    onAnimationFinished: (RippleEffect) -> Unit
): RippleEffect

The factory method.

Subclasses should override this method to return a new instance of an RippleEffect.

coordinates: LayoutCoordinates The layout coordinates of the target layout.
startPosition: PxPosition The position the animation will start from.
density: Density The Density object to convert the dimensions.
radius: Dp? Effects grow up to this size.
clipped: Boolean If true the effect should be clipped by the target layout bounds.
clock: AnimationClockObservable The animation clock observable that will drive this ripple effect
requestRedraw: () -> Unit Call when the ripple should be redrawn to display the next frame.
onAnimationFinished: (RippleEffect) -> Unit Call when the effect animation has been finished.