https://kotlinlang.org logo
#compose
Title
# compose
p

Peter Mandeljc

07/13/2021, 6:22 PM
Is it possible to intercept click event before child composable? For (bad) example, how would one intercept event on Column level, and not pass it to TextField, without making any changes to TextField:
Copy code
Column(modifier = Modifier.clickable { Timber.d("click") }) {
    TextField(value = "smth", onValueChange = {})
}
t

Tash

07/13/2021, 11:45 PM
interesting, in this case
TextField
will consume focus/taps because it internally uses
textFieldFocusModifier
which relies on the
enabled
boolean you pass to `TextField`…in this case
TextField
enabled
will have to be set to
false
to enable a parent to intercept
3 Views