Would anyone have any insight into why this weird ...
# compose
a
Would anyone have any insight into why this weird view transition behavior would be happening? If it’s not clear from the video… I don’t like that odd pop up and down behavior. Any ideas/advice would be greatly appreciated. here’s my transition code:
Copy code
composable(LeafScreen.Account.route,
        enterTransition ={
            slideIntoContainer(AnimatedContentScope.SlideDirection.Right, tween(5_000))
        },
        exitTransition = {
            slideOutOfContainer(AnimatedContentScope.SlideDirection.Left, tween(5_000))
        }
        ) {....}
    composable(LeafScreen.SignIn.route,
        enterTransition ={
            slideIntoContainer(AnimatedContentScope.SlideDirection.Left, tween(5_000))
        },
        exitTransition = {
            slideOutOfContainer(AnimatedContentScope.SlideDirection.Right, tween(5_000))
        }
    ) {....}
I’m doing this navigation from a BottomSheetScaffold… I wonder if that has something to do with it? I’m using accompanist-navigation-animation:0.24.3-alpha i’m also using androidx.navigationnavigation compose2.4.2
j
This could be related to
BottomSheetScaffold
, yes. If you leave out the
BottomSheetScaffold
, does it work?
a
@jossiwolf Just removed the BottomSheetScaffold and it works fine. 😕 so at least we know what the culprit was. Unfortunately I need that component in my design. But it’s likely not an issue with the official BottomSheetScaffold. I made a modified version, in order to have a bottom navigation bar and a persistent bar that goes above it for playback controls.
Thank you for your assistance. Happy to at least find the source of the issue.
j
@Alexander Black Can you give it a shot with Material's
BottomSheetScaffold
and see if you can repro? If you can isolate it and file an issue, that'd be very helpful :)
a
@jossiwolf After further investigation into the issue yesterday, I concluded it was definitely an issue with my implementation of BottomSheetScaffold. I have some pretty significant modifications to the official BottomSheetScaffold in order to create this functionality:
I actually ended up fixing the transitions for that view I was showing you. It turned out my views where using fillMaxWidth() when they should be using fillMaxSize() because of the measurement adjustments that I did to the BottomSheetScaffold. It’s all working now. 🙂
j
Perfect! 🎉