communicate: close the gap between the dialer and the tab bar (#563)
- Commit
cfd58a49ca29daf51f2cae48e6262aa1d9344c37- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-19 23:54 UTC (3 months ago)
- Parents
fd35c4c
Diff
library/ui/src/main/java/com/vayunmathur/library/ui/TabbedPagerScaffold.kt
diff --git a/library/ui/src/main/java/com/vayunmathur/library/ui/TabbedPagerScaffold.kt b/library/ui/src/main/java/com/vayunmathur/library/ui/TabbedPagerScaffold.ktindex 4dc8662a89..8b60cc7a2f 100644--- a/library/ui/src/main/java/com/vayunmathur/library/ui/TabbedPagerScaffold.kt+++ b/library/ui/src/main/java/com/vayunmathur/library/ui/TabbedPagerScaffold.kt@@ -3,7 +3,9 @@ package com.vayunmathur.library.ui import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.pager.HorizontalPager@@ -82,10 +84,16 @@ fun TabbedPagerScaffold( ) { padding -> // Inner pages own their top bar and consume the top inset, so only // the bottom space this scaffold's bars take is forwarded - adding- // the full padding here would inset the status bar twice.+ // the full padding here would inset the status bar twice. The+ // forwarded space has to be consumed too: the bars already cover+ // the navigation bar, so a page's own scaffold would otherwise+ // inset for it again and leave a gap above the tab bar.+ val bottom = padding.calculateBottomPadding() HorizontalPager( state = pagerState,- modifier = Modifier.padding(bottom = padding.calculateBottomPadding()),+ modifier = Modifier+ .padding(bottom = bottom)+ .consumeWindowInsets(PaddingValues(bottom = bottom)), ) { page -> tabs[page].content() } }