RippleTheme
interface RippleTheme
androidx.compose.material.ripple.RippleTheme |
Defines the appearance for Ripples. You can define a new theme and apply it using AmbientRippleTheme. See defaultRippleColor and defaultRippleAlpha for default values that can be used when creating your own RippleTheme.
Summary
Public methods | |
---|---|
abstract Color | |
abstract RippleAlpha |
Companion functions | |
---|---|
RippleAlpha |
defaultRippleAlpha(contentColor: Color, lightTheme: Boolean) Represents the default RippleAlpha that will be used for a ripple to indicate different states. |
Color |
defaultRippleColor(contentColor: Color, lightTheme: Boolean) Represents the default color that will be used for a ripple if a color has not been explicitly set on the ripple instance. |
Public methods
defaultColor
@Composable abstract fun defaultColor(): Color
Return | |
---|---|
the default ripple color at the call site | 's position in the hierarchy. This color will be used when a color is not explicitly set in the ripple itself. |
See Also
rippleAlpha
@Composable abstract fun rippleAlpha(): RippleAlpha
Return | |
---|---|
the | RippleAlpha used to calculate the alpha for the ripple depending on the Interaction for a given component. This will be set as the alpha channel for defaultColor or the color explicitly provided to the ripple. |
See Also
Companion functions
defaultRippleAlpha
fun defaultRippleAlpha(
contentColor: Color,
lightTheme: Boolean
): RippleAlpha
Represents the default RippleAlpha that will be used for a ripple to indicate different states.
Parameters | |
---|---|
contentColor: Color | the color of content (text or iconography) in the component that contains the ripple. |
lightTheme: Boolean | whether the theme is light or not |
defaultRippleColor
fun defaultRippleColor(
contentColor: Color,
lightTheme: Boolean
): Color
Represents the default color that will be used for a ripple if a color has not been explicitly set on the ripple instance.
Parameters | |
---|---|
contentColor: Color | the color of content (text or iconography) in the component that contains the ripple. |
lightTheme: Boolean | whether the theme is light or not |