You don’t need to tag the channel name in every post. You’re already here.
Kirill Grouchnikov
07/10/2023, 4:28 AM
As to your question, is it only for touch events, or for any user interaction such as keyboard, accessibility traversal, etc? What do you mean by intercept - block, conditionally handle, something else?
d
dan
07/10/2023, 5:58 AM
only touch and draw,my requirement is if the main switch close, the other function can't operate, such as : click to open a dialog, draw a slider, click other switch
j
Julius Hinze
07/11/2023, 12:15 PM
You should define a state e.g. (note this is pseudocode)
var isClicked = remember mutableStateOf false
And then you can do
onClick = { isClicked = true
} .
To show a slider you use conditional rendering, e.g. with
AnimatedVisibility(isClicked) { Slider() }
.
Opening a dialog is something else. I suggest you post another question here.