ascii
09/30/2023, 3:22 PMModifier.navigationBarPadding()
so that it overlays over content, while still leaving space when you scroll to the end? More in thread.ascii
09/30/2023, 3:27 PMColumn {
Content()
… // more stuff
Spacer(Modifier.navigationBarPadding()) // last
}
Recording 2:
Column(Modifier.navigationBarPadding()) {
Content()
… // more stuff
}
(2) is obviously simpler, as you can just apply it to the parent composable (e.g. NavHost), but it doesn't give me what I want.
(1) is what I want, but it's quite cumbersome to do this in every screen, especially when it needs to be applied conditionally. For example, if we're choosing to show a bottom bar instead of a side rail on small screens, we don't need to apply nav bar padding as it's not relevant anymore.
With (1) I find myself needing to pass a few parameters to every single composable; from the parent all the way down to the last child that needs to use it. This just feels like a lot of unnecessary parameter drilling when maybe it can be handled in a better way?Stylianos Gakis
09/30/2023, 4:00 PMFrancesc
09/30/2023, 4:15 PM