Chris Johnson
10/11/2022, 9:36 PMModifier.focusable(false)
isn't doing what I expect it to do. My use case is I want to have a TextField that looks editable, but when clicked on is not focused and instead goes to a different screen. Ideally I'd like to use enabled = false
but that changes the colors in an undesirable way. Currently, it still focuses the text in the TextField before navigating awayKirill Grouchnikov
10/11/2022, 10:00 PMChris Johnson
10/11/2022, 10:14 PMKirill Grouchnikov
10/11/2022, 10:18 PMChris Johnson
10/11/2022, 10:21 PMZach Klippenstein (he/him) [MOD]
10/12/2022, 1:27 AMChris Johnson
10/12/2022, 1:37 AMKirill Grouchnikov
10/12/2022, 1:52 AMDan MacNeil
10/12/2022, 1:40 PMChris Johnson
10/12/2022, 6:12 PMAlex Petitjean
10/13/2022, 7:42 PMTextField
composables have a readOnly
parameter that might do what you want. I was recently doing something similar and found that it's kind of difficult to detect clicks on a TextField
, so the Box
wrapper may be the best solution.
You could also try looking at the MutableInteractionSource
parameter as well. It exposes a Flow of interactions that you could listen to.Chris Johnson
10/13/2022, 7:48 PM