Christopher Mederos
03/21/2024, 12:18 AMChristopher Mederos
03/21/2024, 12:19 AMOutlinedTextField(
value = value,
onValueChange = onValueChange,
label = { Text(text = label) },
suffix = { Text(text = inputSuffix) },
placeholder = { Text(text = placeHolder) },
modifier = Modifier.widthIn(max = 100.dp),
singleLine = true,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Number,
imeAction = imeAction
),
keyboardActions = keyboardActions,
)
Sean Proctor
03/21/2024, 2:26 AMmaxLines = 1
on the text in the label, suffix, and placeholder. if it's M3, the height is supposed to be 56 DP, so you could just set that if everything else fails.Christopher Mederos
03/21/2024, 3:12 AMlabel = { Text(text = "Label", maxLines = 1) }
In that case, seems like the singleLine parameter in the OutlinedTextField composable only applies to the value itself (not the label, suffix, etc.)Sean Proctor
03/21/2024, 1:07 PMmaxLines
. You need to set that in the Text
. It's weird that the width of the label is shorter during animation than at the start or end. It might be a bug.Christopher Mederos
03/21/2024, 11:47 PMit's weird that the width of the label is shorter during animationyea... I think it happens because the suffix inside the textfield takes up some of the width (whereas when the label is on the outline, it can take the full width)