I have some compose Boxes and I want to be able to drag and drop them and also click them.
This works so far, but the problem is there is no pressed state at all. I want to have a ripple effect.
Using dragAndDropSource like this:
.dragAndDropSource {
this.detectTapGestures(
onPress = { Toast.makeText(context, "Test", Toast.LENGTH_SHORT).show() },
onLongPress = { Toast.makeText(context, "Test", Toast.LENGTH_SHORT).show() },
)
}
On press there is no UI state change at all, on long press there is also nothing until the drag starts.
What I actually want is to have the same ripple effect as when I use this:
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = ripple(),
) { Toast.makeText(context, "Test", Toast.LENGTH_SHORT).show() }
Is this possible somehow?