WHAT I AM TRYING TO DO: I am trying to use a TextField inside the title of MediumTopAppBar. THE PROBLEM: The TextField looks like it's been cut off from the top.
MY CODE
Scaffold(
topBar = {
MediumTopAppBar(
title = {
TextField(
value = "",
onValueChange = {/*TODO*/},
modifier = Modifier
.fillMaxWidth()
.padding(0.dp)
.height(40.dp)
.zIndex(1f)
.border(0.dp, Color.Transparent, RoundedCornerShape(8.dp)),
colors = TextFieldDefaults.textFieldColors(
textColor = Color.Gray,
disabledTextColor = Color.Transparent,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
disabledIndicatorColor = Color.Transparent
),
shape = RoundedCornerShape(8.dp)
)
},
......
I tried to set the heigh of the TextField with smaller number
Use a
BasicTextFieldinstead of aTextField: