mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
Add NoAnimation transition config
This commit is contained in:
@@ -205,10 +205,15 @@ function forFade(props) {
|
||||
};
|
||||
}
|
||||
|
||||
function forNoAnimation(props) {
|
||||
return {};
|
||||
}
|
||||
|
||||
export default {
|
||||
forHorizontal,
|
||||
forVertical,
|
||||
forFadeFromBottomAndroid,
|
||||
forFadeToBottomAndroid,
|
||||
forFade,
|
||||
forNoAnimation,
|
||||
};
|
||||
|
||||
@@ -63,6 +63,17 @@ const FadeOutToBottomAndroid = {
|
||||
screenInterpolator: StyleInterpolator.forFadeToBottomAndroid,
|
||||
};
|
||||
|
||||
const NoAnimation = {
|
||||
transitionSpec: {
|
||||
duration: 0,
|
||||
timing: Animated.timing,
|
||||
},
|
||||
screenInterpolator: StyleInterpolator.forNoAnimation,
|
||||
containerStyle: {
|
||||
backgroundColor: '#eee',
|
||||
},
|
||||
};
|
||||
|
||||
function defaultTransitionConfig(
|
||||
transitionProps,
|
||||
prevTransitionProps,
|
||||
@@ -114,4 +125,5 @@ export default {
|
||||
ModalSlideFromBottomIOS,
|
||||
FadeInFromBottomAndroid,
|
||||
FadeOutToBottomAndroid,
|
||||
NoAnimation,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user