Tgo1014
02/03/2023, 12:47 PMScaffold(contentWindowInsets = WindowInsets.safeDrawing)
(Material3) with a LargeTopAppBar
it works when it's collapsed but not when it's expandedStylianos Gakis
02/03/2023, 1:05 PMTgo1014
02/03/2023, 1:19 PMcontentWindowInsets
? I'm trying to do a simple reproduction example hereval systemUiController = rememberSystemUiController()
systemUiController.setSystemBarsColor(color = Color.Transparent)
val topAppBarScrollState = rememberTopAppBarState()
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(topAppBarScrollState)
Scaffold(
contentWindowInsets = WindowInsets.safeDrawing,
topBar = {
LargeTopAppBar(
title = { Text("Foobar") },
scrollBehavior = scrollBehavior
)
},
content = {
LazyColumn(
contentPadding = it,
content = { items(50) { Text("123", modifier = Modifier.fillMaxWidth()) } },
modifier = Modifier
.nestedScroll(scrollBehavior.nestedScrollConnection)
.fillMaxSize(),
)
},
modifier = Modifier.fillMaxSize()
)
windowInsetPadding
and the other one doesn'tStylianos Gakis
02/03/2023, 1:42 PMtopBar = {}
in your call to Scaffold
.
Then it seems like LargeTopAppBar defaults to TopAppBarDefaults.windowInsets
so that by itself should work no? Which scrollBehavior are you passing in btw?Tgo1014
02/03/2023, 1:47 PMStylianos Gakis
02/03/2023, 1:48 PMTgo1014
02/03/2023, 1:51 PMStylianos Gakis
02/03/2023, 1:52 PMTgo1014
02/03/2023, 2:00 PMLargeTopAppBar
https://issuetracker.google.com/issues/267647327Stylianos Gakis
02/03/2023, 2:04 PMTgo1014
02/03/2023, 2:06 PMAlex Vanyo
02/03/2023, 8:21 PMStylianos Gakis
02/04/2023, 12:07 AMAlex Vanyo
02/04/2023, 12:24 AMStylianos Gakis
02/04/2023, 12:25 AM