I want to change the background color of a TextField in Jetpack Compose, but nothing seems to work.
I have tried setting Modifier.background(color = Color.Transparent)
, but it does not work (color does not change).
Also, I have tried using both colors = TextFieldDefaults.textFieldColors(...)
and colors = TextFieldDefaults.colors(...)
, as suggested in this question, but none of them have backgroundColor
or any other parameter related to background (in Material3). I have also tried this approach, but it does not work either.
Muhammad Khosravi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.