I've been trying this with a button unsuccessfully...
# compose
n
I've been trying this with a button unsuccessfully. Any ideas?
Copy code
@Composable
fun LongPressButton() {

    val onLongPress = { _: Offset -> println("YAY!") }

    Button(
        modifier = Modifier.longPressGestureFilter ( onLongPress ),
        onClick = { /* Do something! */ }, colors = ButtonDefaults.buttonColors(
            backgroundColor = Color.Red
        )
    ) {
        Text("Button")
    }
}