Hello! I have state as Array<Array<Int>&g...
# compose
p
Hello! I have state as Array<Array<Int>> and have composable as Row[Column] rendering it. I need to handle click event knowing (rowIndex, columnIndex) of target cell. If attach clickabe for each cell it take much time for redrawing when matrix is large. Is it possible to attach clickable on container element and somehow calculate rowIndex and columnIdex for each click event on container? If yes how?
l
Modifier.pointerInput
is what you need, the ultimate pointer input handler. Maybe
PointerInputScope.detectTapGestures
can somehow help you here, though it's a quite large extension.