Implement fade-through transitions for android navigation animation #30388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: no issue
What is the current behavior?
Current transition animation is a bottom-up transition, suitable for modals or bottom-sheet entering.
What is the new behavior?
New transition is right to left fade-through, perfectly suitable for transition between pages.
Does this introduce a breaking change?
Other information
Repo with examlpe
UPD:
Greetings!
On my main job we faced issues with page transition while using regular ionic transitions between pages.
Header was out of sync with content, overlapping pages, improper transitions. I checked that we don't
background-color
on ion-header, that ion-toolbar has proper--background
along with ion-content and ion-footer, but at the end of the day I failed to find a proper solution.I bailed out to make a simple custom animation, taking iosTransitionAnimation as the starting point.
Making a simple transition of whole screen solved the issue we had. But implementing a custom transition means addressing both platforms, so I took a peek at
mdTransitionAnimation
, and it felt off.I quickly checked how android navigation works on my device, and found that these two are completely different.
When going to next pages I observe rather horizontal shift, but in ionic next page comes from bottom-up, – vertical shift.
Being unable to debate which is right, I thought that this fade-through is a suitable transition for navigation back and forward, leaving behind vertical shift in favour of horizontal shift, and implemented it as a main transition between pages in our app for android.
And this is basically a cherry-pick/back-port attempt into ionic mainstream.
Looking forward to know what you think of it.
Thanks!
UPD2: add clarity to the text