-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Navigation Transition Exit/Enter specific option #7700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After thinking about this and my original idea of a new flag. Possibly something as simple as adding: When this is UPDATE: In trying this out, I'm not 100% certain but skipping the steps to apply a current fragment transition ends up not working through the transition logic. I'm sure there is some other stuff happening that I've not debugged yet. So perhaps, a simpler idea is to use I'm not sure on iOS ATM, I believe the slide transitions look and behave like they should on majority of iOS apps so this might end up being an android only transition property. |
I'm looking to achieve the same transition. I tried to create it using a custom transition, which works decently well. I'm using Nativescript Vue, but it should be similar for other versions of Nativescript as well. I created the file
Then I added the following code to my
Then call the transition in a .vue component like this:
Which gives the following transition: The only issue I'm having is that the |
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 doesslide
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 theslideTop
style transition for the new activity/fragment, but the previous activity/fragment does not ALSO get the sameslideTop
for its exit transition. In NS, if you specifyslideTop
then the new fragment uses it forenter
and the current fragment uses it orexit
transition. The current fragment having that same transition applied is why I've never used theslide
transition personally.Describe the solution you'd like
Introduce a new flag into the
NavigationEntry
(maybe eventransitionAndroid
) 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.
Open the API up for
navigate
to specify theenter/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 aslide
transition to enter. It is alsofading
but that's more work involved and outside the scope of this request. Notice how thecurrent
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.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.I've just hacked core-modules a bit and applied

fade
on the current fragment to get this:Again, not perfect, and I might even prefer disabling the
exit
transition of thecurrent
fragment even more so the new one just slides on top instead of 'pushes' it out of the way.The text was updated successfully, but these errors were encountered: