deviant
08/29/2022, 1:08 PMpointerInput
modifier doesn't work with Button
. how can i detect on released
event on a button?Oleksandr Balan
08/29/2022, 1:50 PMInteractionSource
of the button:
val interactionSource = remember { MutableInteractionSource() }
LaunchedEffect(interactionSource) {
interactionSource.interactions.collect {
if (it is PressInteraction.Release) {
Log.d("[InteractionSource]", "Release the button's soul!")
}
}
}
Button(
onClick = { ... },
interactionSource = interactionSource
) {
Text("Tap on me ")
}