Vaibhav Jaiswal
01/09/2024, 9:09 AMedgeToEdge()
in android
I have a simple setup of a Scaffold, with app bar and bottom nav, and a lazy column in between
I have TopAppBarDefaults.enterAlwaysScrollBehavior()
applied, now whats happening is when app bar is hidden, it takes the space of the status bar, hence the Lazy Column does not scroll over the status bar ?
Any way to fix this
If i remove the app bar it works fineascii
01/09/2024, 10:57 AMVaibhav Jaiswal
01/09/2024, 11:00 AMVaibhav Jaiswal
01/09/2024, 1:28 PMval topPadding by derivedStateOf {
if(scrollBehavior?.state?.collapsedFraction == 1f) 0.dp else 32.dp
}
val padding by animateDpAsState(
targetValue = topPadding,
animationSpec = tween()
)
TopAppBar(
scrollBehavior = scrollBehavior,
windowInsets = WindowInsets(0.dp, padding, 0.dp, 0.dp),