Hey I’m having some issues working with TextField()
Copy code
Column(Modifier.padding(innerPadding).fillMaxSize()) {
var textState by state { TextFieldValue("test") }
TextField(
value = textState,
onValueChange = { textState = it },
modifier = Modifier.fillMaxWidth().preferredHeight(240.dp)
)
}
But the “test” text is not editable, as soon as I try to type something - nothing happens and then I get leak from leak canary 😞 Any ideas?
d
David Mcrae Jr
07/23/2020, 1:44 PM
I’m a noob to Compose but I’m using
savedInstanceState
in place of
state
and mine is editable
t
Tomáš
07/27/2020, 10:04 AM
Turns out the issue was that you can edit text only using sw keyboard - it doesn’t work with the hw one atm 🙂