When I try to set a simple fade animation (alpha from: 0, to: 1) on setRoot() it never actually happens.
In your Navigation.events().registerAppLaunchedListener declare your animations as it describes in the documentation (With Navigation.setDefaultOptions()). Nothing is animated even though the documentation clearly states this is how you handle Navigation event animations.
It works for me if I pass the animation options during the navigation action like so:
Navigation.push(this.props.componentId, {
component: {
name: SampleScreen,
options: {
animations: {
push: {
content: {
alpha: {
from: 0,
to: 1,
}
},
}
}
}
}
});
But it works really strange, as if duration isn't taken into account and all the other screen parts' animations get deleted if you specify only one part, e.g. when you only want to override animation for the topBar
, content
default animation seems to be removed.
I'm also trying to figure out how to animate on a setRoot
call. The docs for animation suggest that it's only applied on push
or showModal
, but I'm really hoping that's not the case...
Related to this issue: #3500
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
I'm also trying to figure out how to animate on a
setRoot
call. The docs for animation suggest that it's only applied onpush
orshowModal
, but I'm really hoping that's not the case...
The docs here says you can animate startApp
, I tried but it doesn't work either.
@LRNZ09 I updated to docs. startApp animation was renamed to setRoot
and is supported only on Android
@guyca Is there any roadmap to have this feature on iOS too?
Most helpful comment
I'm also trying to figure out how to animate on a
setRoot
call. The docs for animation suggest that it's only applied onpush
orshowModal
, but I'm really hoping that's not the case...