Carl Benson
03/07/2023, 8:38 AMBasicTextField
to achieve text field without inner paddings, but then label animation is only happening on text entry, and not on focus (which it does on TextField
). Is that expected?Zach Klippenstein (he/him) [MOD]
03/07/2023, 4:59 PMCarl Benson
03/08/2023, 7:44 AMCarl Benson
03/08/2023, 7:45 AMBasicTextField(
value = value,
onValueChange = onValueChange,
modifier = modifier
.indicatorLine(
enabled = enabled,
isError = isError,
interactionSource = interactionSource,
colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = MaterialTheme.colors.onSurfaceVariant,
),
),
enabled = enabled,
readOnly = readOnly,
textStyle = textStyle,
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
singleLine = singleLine,
maxLines = maxLines,
visualTransformation = visualTransformation,
onTextLayout = onTextLayout,
cursorBrush = cursorBrush,
) { innerTextField ->
TextFieldDefaults.TextFieldDecorationBox(
value = value,
innerTextField = innerTextField,
enabled = enabled,
singleLine = singleLine,
visualTransformation = visualTransformation,
interactionSource = interactionSource,
isError = isError,
label = label,
placeholder = placeholder,
leadingIcon = leadingIcon,
trailingIcon = trailingIcon,
colors = colors,
contentPadding = contentPadding,
)
}
Carl Benson
03/08/2023, 7:47 AMTextFieldDecorationBox
should take care of that in CommonDecorationBox
Carl Benson
03/08/2023, 7:51 AMCarl Benson
03/08/2023, 7:52 AM