https://kotlinlang.org logo
#compose
Title
# compose
z

Zun

06/15/2021, 4:55 PM
Is there an easy way to make my transparent topBar overlay the content in my Scaffold, or do I manually need to add my toolbar+content in a box?
t

tad

06/15/2021, 5:22 PM
Yes, you'll need to manually do that. To do it everywhere, copy the code from Scaffold.kt and make your own Scaffold composable.
You could apply
Modifier.offset
to the body composable, but ScaffoldLayout will remove the top bar's height from the body's height in all cases
I guess you could wrap Scaffold and place the topBar argument in the body, that would be a bit easier
z

Zun

06/15/2021, 5:32 PM
alright thank you
25 Views