Did anyone try the new `RippleConfiguration` apis ...
# compose
a
Did anyone try the new
RippleConfiguration
apis from material 1.3.0(-beta)s yet? I am trying to customize the Ripple alpha but cannot get the defaults. The old way (
RippleTheme.defaultRippleAlpha
) is deprecated, the deprecation message advises me to use
MaterialRippleThemeDefaults#RippleAlpha
but
MaterialRippleThemeDefaults
does not exist. Does anyone know where to get the platform defaults?
From the source code it looks like
androidx.compose.material3.RippleDefaults
is what they meant to point to It can be found here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]l3/src/commonMain/kotlin/androidx/compose/material3/Ripple.kt
s
The docs should cover the migration as a whole https://developer.android.com/develop/ui/compose/touch-input/user-interactions/migrate-indication-ripple My assumption is that they can not say "`androidx.compose.material3.RippleDefaults`" explicitly, since they can not assume you are using material3 or material2 or whatever. That deprecation notice is in a separate artifact.
a
I don’t see any documentation for RippleAlpha defaults.. it’s incomplete, but this is expected for google tbh
As to your assumption: they could just discuss both cases, very simple, no need to make us guess
s
Yeah, probably good to file an issue for this
324 Views