https://kotlinlang.org logo
Title
c

Colton Idle

04/19/2022, 1:31 PM
Does this answer still hold true? "What's the purpose of paddingvalues in a scaffold?" https://stackoverflow.com/a/70210638
n

nitrog42

04/19/2022, 1:34 PM
it seems so :
```val bodyContentPlaceables = subcompose(ScaffoldLayoutContent.MainContent) {
val innerPadding = PaddingValues(bottom = bottomBarHeight.toDp())
content(innerPadding)
}.fastMap { it.measure(looseConstraints.copy(maxHeight = bodyContentHeight)) }```
from Scaffold.kt with 1.2.0-alpha06
💯 1
a

Alex Vanyo

04/20/2022, 10:51 PM
Just want to call out that this behavior has now changed for
material3
Scaffold
specifically. https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.0-alpha10 For
material3
’s
Scaffold
, the top bar is now included in the inner padding. As a consequence, there will be no need for an
accompanist/insets-ui
version of `material3`’s
Scaffold
for the use case of a translucent top app bar where you want to display content behind the top app bar. The behavior for
material
Scaffold
is unchanged, so that behavior is still accurate.
🤩 1
c

Colton Idle

04/20/2022, 11:24 PM
Oooh. very nice! I think that might be enough of a reason for me to try m3. 😄