Skip to content

Navigation Transition Exit/Enter specific option #7700

Open
@bradmartin

Description

@bradmartin

Is your feature request related to a problem? Please describe.
For years I've avoided the slide transition on Android because I've never used an app on android (in many years) that does slide transitions that look how NS does. So it looked odd to me to have a weird transition that most android users of native apps have never seen, a bit gimmicky at times. A lot of Android apps use the slideTop style transition for the new activity/fragment, but the previous activity/fragment does not ALSO get the same slideTop for its exit transition. In NS, if you specify slideTop then the new fragment uses it for enter and the current fragment uses it or exit transition. The current fragment having that same transition applied is why I've never used the slide transition personally.

Describe the solution you'd like

  1. Introduce a new flag into the NavigationEntry (maybe even transitionAndroid) that allows the user to DISABLE the current fragment having the exit/reenter transition applied to it.
    --- I prefer option 1 since it's not breaking and provides a very nice feature to improve NS Android.

  2. Open the API up for navigate to specify the enter/exit transitions.

Describe alternatives you've considered
Hacking this in my core-modules with a custom fork 😄.

Additional context

For some context.

Notice in the Settings app, the new fragment/activity is using a slide transition to enter. It is also fading but that's more work involved and outside the scope of this request. Notice how the current main fragment/activity does not have the same transition applied to it. Which is good on back nav because the previous page is visible to the user and they aren't watching some "reverse" transition.

settingsapp

Here is how NS currently does the slideTop which has never been pleasing to me personally as I've never seen this on any Android app I use.
notsmooth

I've just hacked core-modules a bit and applied fade on the current fragment to get this:
slideandfade

Again, not perfect, and I might even prefer disabling the exit transition of the current fragment even more so the new one just slides on top instead of 'pushes' it out of the way.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions