Relative Content

Tag Archive for androidandroid-jetpack-composeandroid-compose-textfield

ActiveParent with no focused child in compose

I can’t share the actual code, but I can describe the issue I’m facing. My screen has two tabs: one for login and one for sign-up. Both tabs are inside a horizontal pager, and they’re navigated to from Screen B using Compose Navigation, like navController.navigate(ScreenA).

Compose TextField lose focus when newline on Samsung Note 10 Lite

Surface { Box(contentAlignment = Alignment.Center, modifier = Modifier .fillMaxSize() .padding(32.dp)) { var state by remember { mutableStateOf(TextFieldValue(“”)) } TextField(value = state, onValueChange = { state = it }, keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text), ) }} Those code are my TextField and it lose focus when I click the newline button at soft keyboard. This situation […]

Compose TextField lose focus when newline on Samsung Note 10 Lite

Surface { Box(contentAlignment = Alignment.Center, modifier = Modifier .fillMaxSize() .padding(32.dp)) { var state by remember { mutableStateOf(TextFieldValue(“”)) } TextField(value = state, onValueChange = { state = it }, keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text), ) }} Those code are my TextField and it lose focus when I click the newline button at soft keyboard. This situation […]