Is there a way to customise, (I would like to shorten the length) of the focussed indicator line on a TextField in Android Compose UI?
I know it's possible to hide it by setting the focusedIndicatorColor
to Transparent as per example below:
TextField(
value = ...,
onValueChange = { ... },
label = { Text("...") },
modifier = Modifier.weight(1f).padding(horizontal = 8.dp, vertical = 6.dp),
shape = RoundedCornerShape(8.dp),
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.LightGray,
cursorColor = Color.Black,
disabledLabelColor = Color.LightGray,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent
)
)