https://kotlinlang.org logo
Title
j

jannis

12/10/2021, 11:25 AM
I'm using a
AnimatedNavHost
from the Accompanist library (+latest Compose beta). Even if I disable all animations, e.g.:
AnimatedNavHost(
    ...
    enterTransition = { EnterTransition.None },
    exitTransition = { ExitTransition.None },
    popEnterTransition = { EnterTransition.None },
    popExitTransition = { ExitTransition.None },
) {
I see an expand transition when I open a new screen. Can I disable that somehow? I don't even see where this might coming from 😅
a

Alex

12/10/2021, 11:30 AM
afaik routes can also define their own animations, maybe they set a default value there?
j

jannis

12/10/2021, 11:58 AM
I have a nested navigation. I've removed the transition everywhere.
Hmm. When I do a simple sample project I don't get the animation 😅 seems I have to have a second look
😬 1
a

allan.conda

12/10/2021, 8:39 PM
You can try to reduce your code into a minimal state, then Undo until the issue occurs. Maybe there's a Crossfade function on the content?
k

Kimon

01/30/2022, 12:08 PM
I have the same issue. @jannis did you find a solution to this?
j

jannis

01/31/2022, 7:58 AM
Yes. The problem was that the initial Composable of the target destination had a size of 0, instead of filling the whole screen
🙌 1
k

Kimon

01/31/2022, 8:30 AM
Thank you for your answer. I will check it out 🙂
That was the problem for me also. Thank you for saving me from extra hours of troubleshooting 🙂
👍 1