Skip to content

Instantly share code, notes, and snippets.

@AndroidPoet
Created October 12, 2022 10:46
Show Gist options
  • Save AndroidPoet/a862b6b107145808e60584c08410b03e to your computer and use it in GitHub Desktop.
Save AndroidPoet/a862b6b107145808e60584c08410b03e to your computer and use it in GitHub Desktop.
@Composable
fun TextFieldDemo() {
Column(Modifier.padding(16.dp)) {
val textState = remember {mutableStateOf(mutableStateOf(""))}
TextField(
value = textState.value,
onValueChange = { textState.value = it }
)
Text("The textfield has this text:textState.value.text)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment