Hello people, is this the expected Transition beha...
# compose
l
Hello people, is this the expected Transition behavior, or something is being bad implemented at navigation? 🤔 Looks like when crossfade occur, the measuring of the content is wrong
s
Looks like some of the content changes instantly from the change in the destination, and then some of the content (probably the one inside the NavHost() changes using crossfade, as that’s the default animation for the non accompanist NavHost. I don’t see it going back and forth, so I don’t think it’s looking wrong, just that your top toolbar doesn’t look like it’s part of the NavHost content at all, so that changes instantaneously. Am I understanding this correctly?
l
Yeap, apparently that is the case. The navhost is part of the scaffold content, so the top bar is outside the navhost, producing that change
But I don't think that moving the navhost outside the scaffold content would make much sense
s
Yeah, it might not make sense. So you need to consider how you want this to play out. What I do in a very similar case, where the bottom nav bar is outside of the NavHost, I have it animate in and out as it is toggled to show or not. But what would you prefer to happen in your case really? One first step could be to use the accompanist navigation instead and have the animation be nothing, just directly go to the target state instantly. That at least would not make it feel awkward with the fade. And later you can go from there and add some type of animation instead.
l
I think both sound good for our requirements. Thanks a Lot for the advice ! 😄