Didier Villevalois
09/14/2025, 1:35 PMModalWideNavigationRail
in place of a ModalNavigationDrawer
. However, I fail to align my TopAppBar
navigation icon, to the one of the ModalWideNavigationRail
. The latter takes a nullable header
, but despite I pass null
it allocates some space for it (see attached video). If I try to put something in the header, then I get big padding above my header content.
However, when you look at the pictures of the M3 Expressive update for NavigationRail, there isn't such a padding above the header.
Does anyone have a hint on what I am doing wrong? Or is this a bug?Didier Villevalois
09/14/2025, 1:39 PMmodalNavigationRail == true
and hideOnCollapse == true
):
Row(modifier = modifier.fillMaxSize()) {
if (modalNavigationRail) {
ModalWideNavigationRail(
state = state.navigationRailState,
hideOnCollapse = hideOnCollapse,
header = null,
expandedShape = RoundedCornerShape(
topStart = 0.dp,
topEnd = 16.dp,
bottomStart = 0.dp,
bottomEnd = 16.dp
),
collapsedShape = RectangleShape,
expandedHeaderTopPadding = 0.dp,
) {
navigationContent()
}
} else {
WideNavigationRail(
state = state.navigationRailState,
header = null,
shape = RectangleShape
) {
navigationContent()
}
}
Column {
content()
}
}