Came across a strange thing yesterday. When i pass color values to the
Код: Выделить всё
focusedSupportingTextColor
Код: Выделить всё
unfocusedSupportingTextColor
Код: Выделить всё
TextFieldDefaults.color()
Код: Выделить всё
@Composable
fun CounterTextInput(
modifier: Modifier = Modifier,
hint: String,
counterText: String,
maxCount: Int,
presetText: String = "",
onValueChange: ((String) -> Unit)? = null,
enabled: Boolean = true,
keyboardActions: KeyboardActions = KeyboardActions.Default,
visualTransformation: VisualTransformation = VisualTransformation.None
) {
var value by remember { mutableStateOf(presetText) }
var currentCount by remember { mutableIntStateOf(0) }
TextField(
modifier = modifier,
value = value,
onValueChange = { newText ->
if (newText.length
Источник: [url]https://stackoverflow.com/questions/78123187/jetpack-compose-textfield-not-updating-focused-unfocused-supportingtext-colour[/url]