As solved here, I disable the tap flashing by setting the indication
to null
.
However, this is not working for Button or Icons?!
As solved here, I disable the tap flashing by setting the indication
to null
.
However, this is not working for Button or Icons?!
You can use
Modifier.pointerInput(Unit) {
detectTapGestures(
onPress = { /* Called when the gesture starts */ },
onDoubleTap = { /* Called on Double Tap */ },
onLongPress = { /* Called on Long Press */ },
onTap = { /* Called on Tap */ }
)
}
instead of onClick()
.It' will not show the wave effect when click the button.
In the
Button
you can't use theindication=null
in theclickable
modifier since it is defined internally by the component which usesindication = rememberRipple()
. This creates and remembers aRipple
using values provided byRippleTheme
.You can provide a custom
LocalRippleTheme
to override the default behaviour.Something like:
with: