Is there anything special about `Scaffold` ? I alw...
# compose
k
Is there anything special about
Scaffold
? I always compared it to
AppBarLayout
but it seems that it is OK to nest
Scaffolds
. Even Now In Android does it. https://github.com/android/nowinandroid. It
Scaffold
just a special kind of
Column
following some Material design parameters?
1
s
A
Scaffold
is just a container that positions typical elements on a Material screen correctly. It places your floating action buttons, top bars, bottom bars and stuff, and makes sure that they adhere to Material guidelines such as moving the FAB when a snackbar pops up etc. Nesting several `Scaffold`s is not a problem, as long as you keep track of the various `ScaffoldState`s. simple smile
k
I just tried it out. I have a
Scaffold(BottomBar) -> Scaffold(TopBar)
below it. And the content of the second scaffold draws over its own TopBar. Do I have to somehow use padding to make this work?
s
You do receive a
PaddingValues
in the
content
block of the
Scaffold
. You should probably apply that, yeah. 👍
🙌 1
1