Class

RippleConfiguration

Configuration for ripple appearance, provided using LocalRippleConfiguration.

Source set: Android
public class RippleConfiguration internal constructor(
    public val color: Color,
    public val focus: Focus?,
    rippleAlpha: RippleAlpha?,
)

Configuration for ripple appearance, provided using LocalRippleConfiguration. In most cases the default values should be used, for custom design system use cases you should instead build your own custom ripple using createRippleModifierNode. To disable the ripple, provide null using LocalRippleConfiguration.

The ripple configuration is resolved as follows:

    including whether the focus indication is drawn by inset focus rings.

  • LocalRippleThemeConfiguration provides the highest-level theming configuration for ripples,
  • including disabling ripples and their indications. This takes next highest priority.

  • LocalRippleConfiguration provides hierarchical per-ripple configuration for ripple,
  • components.

  • ripple parameters allow specifying configuration for individual indication callsites in

Properties

rippleAlpha

Source set: Android
@Deprecated(
        "Use other configuration options in RippleThemeConfiguration, RippleConfiguration and ripple. " +
            "Changing whether focus is displayed by opacity or inset focus rings is changed by providing " +
            "different values with LocalRippleThemeConfiguration. Disabling individual types of interactions " +
            "are displayed by a specific ripple can be done with the boolean parameters on ripple."
    )
    public val rippleAlpha: RippleAlpha? = rippleAlpha

The RippleAlpha used to configure the opacity levels of the per-ripple configuration.

Functions

equals

Source set: Android
override fun equals(other: Any?): Boolean

hashCode

Source set: Android
override fun hashCode(): Int

toString

Source set: Android
override fun toString(): String

Members

Focus

Source set: Android
public sealed class Focus private constructor()

The configuration options for the focus indication for RippleConfiguration.

Members

Opacity

Source set: Android
public object Opacity : Focus()

An opacity-based focus indication.

This describes a use-site specific override for when opacity layer-based focus visuals are used. Currently, there are no configuration options for opacity.

Functions

toString

Source set: Android
override fun toString(): String

InsetRing

Source set: Android
public class InsetRing(
            public val outerStrokeColor: Color = Color.Unspecified,
            public val innerStrokeColor: Color = Color.Unspecified,
        ) : Focus()

An inset ring focus indication. This is drawn using two strokes, an outer stroke and an inner stroke. The inner stroke is drawn first, followed by the outer stroke.

As this describes a use-site specific override, this provides coloring overrides for an inset focus ring being drawn by an individual component. The inset ring dimensions are controlled by RippleThemeConfiguration.Focus.InsetRing instead.

Parameters

outerStrokeColor the color of the outer stroke. If Color.Unspecified, then the default color from the theme will be used instead.
innerStrokeColor the color of the inner stroke. If Color.Unspecified, then the default color from the theme will be used instead.

Functions

equals

Source set: Android
override fun equals(other: Any?): Boolean

hashCode

Source set: Android
override fun hashCode(): Int

toString

Source set: Android
override fun toString(): String
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: