Enahor Tapmas
02/06/2024, 7:12 AM.pointerInput(Unit) {
detectTapGestures(matcher = PointerMatcher.mouse(PointerButton.Secondary)) {
pointerInput = DpOffset(it.x.dp, it.y.dp)
showContextMenu = true
}
}
Anyone know why this code works AOK on desktop but then decides to not exist on android?
import androidx.compose.foundation.PointerMatcher
^^ this is the perfectly legitimate import that it fails on.
If this is not supposed to fail like this, then why is it failing
If this is expected, then the least that could be done here is making it red or something similar so I dont have to wait until I test my code on my device to figure out a refactor is necessaryAlexander Zhirkevich
02/06/2024, 7:18 AMAlexander Zhirkevich
02/06/2024, 7:19 AMEnahor Tapmas
02/06/2024, 7:31 AMAlexander Zhirkevich
02/06/2024, 8:06 AMModifier.pointerInput(0) {
awaitEachGesture {
val event = awaitPointerEvent()
if (event.type == PointerEventType.Press && event.buttons.isSecondaryPressed) {
waitForUpOrCancellation()
println("secondary pressed at ${event.changes.first().position}")
}
}
}
Enahor Tapmas
02/07/2024, 3:32 AM