When I use a `AnimatedVisibility` to wrap a `NavBa...
# compose
d
When I use a
AnimatedVisibility
to wrap a
NavBarItem
in a
NavBar
the
AnimatedVisibility
fills the max space of the bar. Not sure how to prevent this from happening. Has anyone else run into this?
Maybe @Doris Liu?
s
Would be nice to paste a snippet of what exactly you’ve tried so far
1
d
It's likely because
NavBarItem
has a weight set on it. When wrapped in an AnimatedVisibility, the
NavBarItem
is no longer the direct child of the
Row
(created by
NavBar
). Instead, it becomes the only child of the
Layout
defined by AnimatedVisibility. So the
weight
doesn't have intended effect of constraining size relative to siblings in the same
Row
d
That makes total sense.