I'm using
DropDownMenuItem
with a
Text
in a
DrowpDownMenu
, and I need to reduce the
DropDownMenuItem
height to the height of the
Text
, or with a minimum padding of
2.dp
. Now the height of the
DropDownMenuItem
is very big on big screens. Is double of the height of the
Text
. Also, the parent
DrowpDownMenu
is adding even more height. How can that height be reduced to the
Text
height? I already tryed setting a modifier with padding 0.dp to both, with no results.
Box {
TextButton(onClick = { expandedFile = !expandedFile }) {
Text(stringResource(Res.string.menu_file))
}
DropdownMenu(
expanded = expandedFile,
onDismissRequest = { expandedFile = false }
) {
DropdownMenuItem(
text = { Text(stringResource(Res.string.exit)) },
onClick = {
expandedFile = false
onExitEvent()
}
)
}
}