Skip to content

Commit

Permalink
android nav: Use a better stack-nav animation.
Browse files Browse the repository at this point in the history
In one of the recent React Navigation upgrades, the animation for a
new screen entering and leaving the stack, on Android, changed.

We like how it was before [1]. So, put it back.

[1] zulip#4249 (comment)
  • Loading branch information
chrisbobbe committed Sep 15, 2020
1 parent 8d4cb27 commit d058667
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/nav/AppNavigator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* @flow strict-local */
import { createStackNavigator } from 'react-navigation-stack';
import { Platform } from 'react-native';
import { createStackNavigator, TransitionPresets } from 'react-navigation-stack';

import AccountPickScreen from '../account/AccountPickScreen';
import RealmScreen from '../start/RealmScreen';
Expand Down Expand Up @@ -69,6 +70,12 @@ export default createStackNavigator(
sharing: { screen: SharingScreen },
},
{
defaultNavigationOptions: {
...Platform.select({
android: TransitionPresets.FadeFromBottomAndroid,
ios: TransitionPresets.SlideFromRightIOS,
}),
},
initialRouteName: 'main',
headerMode: 'none',
},
Expand Down

0 comments on commit d058667

Please sign in to comment.