Merge pull request #73 from react-navigation/android-default-stack-anim

Prevent previous screen fade out on push/pop on Android
This commit is contained in:
Brent Vatne 2018-12-19 09:50:19 -08:00 committed by GitHub
commit f1eec36734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -125,8 +125,8 @@ function forFadeFromBottomAndroid(props) {
const { first, last } = interpolate;
const index = scene.index;
const opacity = position.interpolate({
inputRange: [first, first + 0.5, first + 0.9, index, last],
outputRange: [0, 0.25, 0.7, 1, 0],
inputRange: [first, first + 0.5, first + 0.9, index, last - 1e-5, last],
outputRange: [0, 0.25, 0.7, 1, 1, 0],
extrapolate: 'clamp',
});
@ -160,7 +160,7 @@ function forFadeToBottomAndroid(props) {
const opacity = position.interpolate({
inputRange,
outputRange: [0, 1, 0],
outputRange: [0, 1, 1],
extrapolate: 'clamp',
});