Rafs
01/03/2022, 10:34 PMTextField
property is responsible for drawing the thin horizontal line when in unfocused mode? It disappears when the textfield is focused. Right image is focused, left is unfocusedChris Sinco [G]
01/04/2022, 4:33 AMTobias Suchalla
01/04/2022, 6:56 AMindicatorColor
. You can alter this color via
val colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = <http://Color.xyz|Color.xyz>,
unfocusedIndicatorColor = <http://Color.xyz|Color.xyz>,
disabledIndicatorColor = <http://Color.xyz|Color.xyz>,
errorIndicatorColor = <http://Color.xyz|Color.xyz>
)
TextField(
value = value,
onValueChange = { value = it },
colors = colors
)
The line seemingly disappears because it uses the accent color when focused which is apparently also your background color.
See also: https://material.io/components/text-fields#filled-text-fieldChris Sinco [G]
01/04/2022, 7:09 AMRafs
01/04/2022, 2:58 PM