RippleNodeConfiguration


The configuration for the ripple node created by createRippleModifierNode.

Summary

Nested types

Represents the configuration for the visual representation of drag

No drag visual - the created ripple will not show anything for drag.

An opacity-based drag visual.

Represents the configuration for the visual representation of focus

An inset ring focus visual - the created ripple will show an inset focus ring.

No focus visual - the created ripple will not show anything for focus.

An opacity-based focus visual.

Represents the configuration for the visual representation of hover

No hover visual - the created ripple will not show anything for hover.

An opacity-based hover visual.

Represents the configuration for the visual representation of a press

No press visual - the created ripple will not show anything for press.

An opacity-based press visual - the created ripple will show a layer with the given alpha on a press.

Public constructors

RippleNodeConfiguration(
    isBounded: Boolean,
    radius: Dp,
    color: ColorProducer,
    pressConfiguration: RippleNodeConfiguration.PressConfiguration,
    focusConfiguration: RippleNodeConfiguration.FocusConfiguration,
    hoverConfiguration: RippleNodeConfiguration.HoverConfiguration,
    dragConfiguration: RippleNodeConfiguration.DragConfiguration
)
Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

ColorProducer

the main color of the ripple.

Cmn
RippleNodeConfiguration.DragConfiguration

the configuration for the visual representation of drag.

Cmn
RippleNodeConfiguration.FocusConfiguration

the configuration for the visual representation of focus.

Cmn
RippleNodeConfiguration.HoverConfiguration

the configuration for the visual representation of hover.

Cmn
Boolean

if true, ripples are clipped by the bounds of the target layout.

Cmn
RippleNodeConfiguration.PressConfiguration

the configuration for the visual representation of a press.

Cmn
Dp

the radius for the ripple.

Cmn

Public constructors

RippleNodeConfiguration

RippleNodeConfiguration(
    isBounded: Boolean,
    radius: Dp,
    color: ColorProducer,
    pressConfiguration: RippleNodeConfiguration.PressConfiguration,
    focusConfiguration: RippleNodeConfiguration.FocusConfiguration,
    hoverConfiguration: RippleNodeConfiguration.HoverConfiguration,
    dragConfiguration: RippleNodeConfiguration.DragConfiguration
)
Parameters
isBounded: Boolean

if true, ripples are clipped by the bounds of the target layout. Unbounded ripples always animate from the target layout center, bounded ripples animate from the touch position.

radius: Dp

the radius for the ripple. If Dp.Unspecified is provided then the size will be calculated based on the target layout size.

color: ColorProducer

the main color of the ripple. This color is usually the same color used by the text or iconography in the component. This color will then have the various interaction type configurations applied to calculate the final color used to draw the ripple.

pressConfiguration: RippleNodeConfiguration.PressConfiguration

the configuration for the visual representation of a press.

focusConfiguration: RippleNodeConfiguration.FocusConfiguration

the configuration for the visual representation of focus.

hoverConfiguration: RippleNodeConfiguration.HoverConfiguration

the configuration for the visual representation of hover.

dragConfiguration: RippleNodeConfiguration.DragConfiguration

the configuration for the visual representation of drag.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

color

val colorColorProducer

the main color of the ripple. This color is usually the same color used by the text or iconography in the component. This color will then have the various interaction type configurations applied to calculate the final color used to draw the ripple.

dragConfiguration

val dragConfigurationRippleNodeConfiguration.DragConfiguration

the configuration for the visual representation of drag.

focusConfiguration

val focusConfigurationRippleNodeConfiguration.FocusConfiguration

the configuration for the visual representation of focus.

hoverConfiguration

val hoverConfigurationRippleNodeConfiguration.HoverConfiguration

the configuration for the visual representation of hover.

isBounded

val isBoundedBoolean

if true, ripples are clipped by the bounds of the target layout. Unbounded ripples always animate from the target layout center, bounded ripples animate from the touch position.

pressConfiguration

val pressConfigurationRippleNodeConfiguration.PressConfiguration

the configuration for the visual representation of a press.

radius

val radiusDp

the radius for the ripple. If Dp.Unspecified is provided then the size will be calculated based on the target layout size.