Colton Idle
11/15/2021, 9:20 PMBox(
modifier = Modifier
.border(1.dp, Color.Red)
.fillMaxWidth()
.height(72.dp)
.clickable { Log.e("LOG", "CLICK") }
) { Text(text = "MY TEXT") }
agrosner
11/15/2021, 9:21 PMColton Idle
11/15/2021, 9:24 PMChris Sinco [G]
11/15/2021, 9:39 PMBryan Herbst
11/15/2021, 9:39 PM[snipped to remove tag] once said that ripples were deemed so important they were actually elevated out of material and just into compose directly? So I don’t think material has anything to do with this here, but I could be wrong.I believe that is with respect to the actual drawing and animating of ripples. The concept of a ripple is still present with Material & Compose and can be replaced. Specifically, a
RippleIndication
is the default LocalIndication
in a `MaterialTheme`: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]droidx/compose/material/MaterialTheme.kt;l=75?q=MaterialthemeChris Sinco [G]
11/15/2021, 9:39 PMLouis Pullen-Freilich [G]
11/15/2021, 9:43 PMmaterial-ripple
) because although they are a ‘Material concept’, they are also so innate to Android as a platform that even non-Material design applications use ripples to be consistent with the platform / other applications, and so we wanted them to be easily usable without needing to bring along all of material
or material3
MaterialTheme
makes it so that ripples are the default indication, so if you are not using MaterialTheme
then you should do similar in your own custom theme, if you want to use ripples across your components (you should also set a custom RippleTheme
to get the correct colors from your design system).Abhinav Suthar
11/16/2021, 4:38 AMAbhinav Suthar
11/16/2021, 4:41 AMColton Idle
11/16/2021, 6:48 AM.clickable
modifier then you should see a ripple. My problem was that
MaterialTheme(darkColors()) {
was being used in my root application, therefore it was drawing a light ripple. If I just wrap my box with
MaterialTheme(lightColors()) {
then everything works as expected. Thanks @Louis Pullen-Freilich [G] interesting to hear how that was pulled into a separate artifact.Abhinav Suthar
11/16/2021, 6:50 AM