This repository was archived by the owner on Feb 25, 2020. It is now read-only.
Animate headerBackground between scene transitions#3
Merged
brentvatne merged 1 commit intoreact-navigation:masterfrom Aug 21, 2018
Merged
Conversation
Contributor
Author
|
@brentvatne think we could get this merged? |
Contributor
Author
|
Thank you! |
Member
|
I ended up reverting back to using no transition by default in order to not make this a breaking change, and so that we can test this out a bit before we make it default. To opt into using it until then you can do the following in stack config: I exported |
Member
|
in 3.x this will be available in stack config as |
Contributor
Author
|
@brentvatne awesome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Bringing this over from react-navigation/react-navigation#4787
Currently, headerBackground is sort of just plopped in place between scene changes which leads to it looking pretty jarring between transitions. What I'm proposing here is that we keep
headerBackgroundrendered absolutely between scenes much like we do for the left, right and center. The default background interpolator transforms the x-axis moving it to the left and right as the scene transitions. This allows one to pull off the below in a much smoother fashion.