ExitUntilCollapsed causing wierd padding on bottom
Closed this issue · 3 comments
I have 2 composable screens with CollapsingToolbarScaffold
. When you enter 1st screen the padding on the bottom is like it should be 0.dp
, but when you go from 1st to 2nd screen, it seems that the ScrollStrategy.ExitUntilCollapsed
on the second screen adds some padding around 56.dp
on the bottom. If I use any other scroll strategy the problem is gone. Both screens use ScrollStrategy.ExitUntilCollapsed
.
Update 1 (Workaround):
If you add
Box(modifier = Modifier.fillMaxSize()) {
}
Outside of CollapsingToolbarScaffold, the padding is now gone and it is drawn through the whole screen.
Update 2: Real solution
Don't forget to add a modifier = Modifier.fillMaxSize(), else the scaffold isn't expanded to fill the screen, even though you have enough items.
Are you using Compose Navigation for the screen navigation?
I'm using Compose Destinations. I think it was my bad, because I forgot fillMaxSize, and not your libraries fault.
Thank you for clarifying, I'll close the issue! 😃