Pearce Keesling
01/22/2025, 5:58 AMNavigationSuiteScaffold
and I cannot seem to handle the bottom tabs correctly for ime padding.
If I take a look at the implementation it seems like it is consuming the inset:
Modifier.consumeWindowInsets(
when (layoutType) {
NavigationSuiteType.NavigationBar ->
NavigationBarDefaults.windowInsets.only(WindowInsetsSides.Bottom)
But I end up with something like this (attachment) if I use Modifier.imePadding()
. The extra padding seems to match perfectly the amount that should be consumed by the tab bar.
When I use the non-adaptive Scaffold for my tab bar I am given a padding value that I can consume manually to avoid this issue (I have found lots of discussion around doing that), but I don't get such a padding for the adaptive version.
If I manually add a consumeWindowInsets(100.dp)
inside of the content of the NavigationSuiteScaffold
it seems to "work" so it seems like the NavigationBarDefaults.windowInsets
is not correct. I can't find an existing issue though and I have to imagine I wouldn't be the first person to try and use a keyboard with the adaptive scaffold so I am wondering if I'm doing something wrong on my end.Alex Vanyo
01/22/2025, 7:47 PMModifier.recalculateWindowInsets
, which should help give an out to some of these sticky situations when the communication doesn’t happen perfectly.
I do think this is a bug though - the NavigationSuiteScaffold
should be consuming from the insets the amount of space that the navigation UI itself takes upPearce Keesling
01/22/2025, 8:50 PMAlex Vanyo
01/23/2025, 1:45 AMPearce Keesling
01/23/2025, 4:48 PMPearce Keesling
01/24/2025, 7:25 PM