Hello, I have a page with a custom `TopBar` mimic(...
# compose
n
Hello, I have a page with a custom
TopBar
mimic(it is not a Scaffold
TopBar
, rather just a
Box
due to transparency) and I need to use a sticky header in my
LazyColumn
but the header doesn’t stick to custom
Box(TopBar mimic)
as it probably doesn’t treat it as a
TopBar
. How do I manage to have a sticky header with a custom mimic?
z
The easiest solution would be to put your top bar and your list in a Column instead of a Box, since it doesn’t look like the top bar is translucent here. Otherwise, i’m not sure, i’ll ask around.
n
Hey Zach, thanks for the reply! Would it really work? I draw content behind topbar and status bar actually. Will try your suggestion anyway
z
I think you could use the contentPadding parameter to
LazyColumn
for this? Just from reading the kdoc it looks like it should do it.
n
Naah, everything you see on the screen is in a LazyColumn
z
Oh sorry, I thought the top bar was outside the column and you were trying to get sticky headers inside the column to stay below it.
n
Yes top bar outside the lazy list but I draw content behind top bar and status bar as you see. So wouldn’t it look ugly if I set top padding to lazy column?
Everything starting from Image to description text placed into LazyColumn
Tried but not working, actually I need this padding for sticky header only, not for the whole list