GithubHelp home page GithubHelp logo

Comments (7)

UKMIITB avatar UKMIITB commented on September 25, 2024

@raamcosta
Did you get a chance to look at this ?

from compose-destinations.

raamcosta avatar raamcosta commented on September 25, 2024

You can just use DestinationStyle.Animated.None in the annotation of the destination that you want to disable. (This is from memory, but it should be something like this 😅).

Please try it and let me know

from compose-destinations.

raamcosta avatar raamcosta commented on September 25, 2024

Although that may only remove animation from that destination 🤔 If you are navigating to it and your current destination has some exit animation that exit would still be performed I believe.. so that may not be enough to achieve what you want..

But try it please 🙏

from compose-destinations.

UKMIITB avatar UKMIITB commented on September 25, 2024

@raamcosta
Sure. Will try this & share the results here

from compose-destinations.

arunabhdas avatar arunabhdas commented on September 25, 2024

@UKMIITB : Did you manage to get your transition animations to work with Compose Destinations? Do you mind sharing the final code that worked for you?

from compose-destinations.

UKMIITB avatar UKMIITB commented on September 25, 2024

@arunabhdas
For getting the animations for transition between destinations, this is the code that I used

engine =
                        rememberAnimatedNavHostEngine(
                            rootDefaultAnimations =
                                RootNavGraphDefaultAnimations(
                                    enterTransition = {
                                        slideIntoContainer(
                                            towards =
                                                AnimatedContentTransitionScope.SlideDirection
                                                    .Companion
                                                    .Left,
                                            animationSpec = tween(400)
                                        )
                                    },
                                    exitTransition = {
                                        slideOutOfContainer(
                                            towards =
                                                AnimatedContentTransitionScope.SlideDirection
                                                    .Companion
                                                    .Left,
                                            animationSpec = tween(400)
                                        )
                                    },
                                    popEnterTransition = {
                                        slideIntoContainer(
                                            towards =
                                                AnimatedContentTransitionScope.SlideDirection
                                                    .Companion
                                                    .Right,
                                            animationSpec = tween(400)
                                        )
                                    },
                                    popExitTransition = {
                                        slideOutOfContainer(
                                            towards =
                                                AnimatedContentTransitionScope.SlideDirection
                                                    .Companion
                                                    .Right,
                                            animationSpec = tween(400)
                                        )
                                    }
                                )
                        )

from compose-destinations.

raamcosta avatar raamcosta commented on September 25, 2024

Closing this. Take a look at v2's runtime animations as soon as that's documented!

from compose-destinations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.