Spikey Sanju
12/13/2020, 7:34 AMval username = remember { mutableStateOf(TextFieldValue()) }
TextField(
modifier = Modifier.fillMaxWidth().padding(16.dp, 0.dp, 16.dp, 0.dp)
.constrainAs(et_username) {
top.linkTo(title.bottom, margin = 30.dp)
},
label = { Text(text = "Username") },
leadingIcon = { Icon(Icons.Outlined.Person) },
textStyle = typography.subtitle1,
backgroundColor = MaterialTheme.colors.background,
value = username.value,
onValueChange = { username.value = it }
)
Dominaezzz
12/13/2020, 11:40 AMVisualTransformation
I think.Kshitij Patil
12/13/2020, 1:33 PMSurface
with required color as contentColor
might also work. Or probably there's AmbientContentColor
which you can provide with desired color using something like Providers(AmbientContentColor
provides <your color>) {...}Spikey Sanju
12/14/2020, 4:42 AMval username = remember { mutableStateOf(TextFieldValue()) }
TextField(
modifier = Modifier.fillMaxWidth().padding(16.dp, 0.dp, 16.dp, 0.dp)
.constrainAs(et_username) {
top.linkTo(title.bottom, margin = 30.dp)
},
label = { Text(text = "Username") },
leadingIcon = { Icon(Icons.Outlined.Person) },
textStyle = TextStyle(
color = MaterialTheme.colors.onPrimary,
fontSize = TextUnit.Sp(16)
),
backgroundColor = MaterialTheme.colors.background,
value = username.value,
onValueChange = { username.value = it }
)