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

RippleTheme

data class RippleTheme
kotlin.Any
   ↳ androidx.ui.material.ripple.RippleTheme

Defines the appearance and the behavior for Ripples.

You can define new theme and apply it via RippleThemeAmbient.

Summary

Public constructors

<init>(factory: RippleEffectFactory, defaultColor: () -> Color, opacity: () -> Float)

Defines the appearance and the behavior for Ripples.

Properties

() -> Color

The effect that will be used to calculate the Ripple color when it is not explicitly set in a Ripple.

RippleEffectFactory

Defines the current RippleEffect implementation.

() -> Float

The effect that will be used to calculate the opacity applied to the Ripple color.

Public constructors

<init>

RippleTheme(
    factory: RippleEffectFactory,
    defaultColor: () -> Color,
    opacity: () -> Float)

Defines the appearance and the behavior for Ripples.

You can define new theme and apply it via RippleThemeAmbient.

Properties

defaultColor

val defaultColor: () -> Color

The effect that will be used to calculate the Ripple color when it is not explicitly set in a Ripple.

factory

val factory: RippleEffectFactory

Defines the current RippleEffect implementation.

opacity

val opacity: () -> Float

The effect that will be used to calculate the opacity applied to the Ripple color. For example, it can be different in dark and light modes.