forked from vergnet/application-amicale
Changed screen transition animations
This commit is contained in:
parent
128b398aac
commit
de787bf5a6
3 changed files with 35 additions and 17 deletions
|
@ -33,11 +33,10 @@ const AboutStack = createStackNavigator({
|
|||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Creates the drawer navigation stack
|
||||
*/
|
||||
function createDrawerNavigatorWithInitialRoute(initialRoute: string) {
|
||||
return createDrawerNavigator({
|
||||
|
||||
// Create a stack to use animations
|
||||
function createDrawerStackWithInitialRoute(initialRoute: string) {
|
||||
return createStackNavigator({
|
||||
Main: createMaterialBottomTabNavigatorWithInitialRoute(initialRoute),
|
||||
SettingsScreen: {screen: SettingsScreen},
|
||||
AboutScreen: AboutStack,
|
||||
|
@ -49,6 +48,25 @@ function createDrawerNavigatorWithInitialRoute(initialRoute: string) {
|
|||
BlueMindScreen: {screen: BlueMindScreen},
|
||||
EntScreen: {screen: EntScreen},
|
||||
AvailableRoomScreen: {screen: AvailableRoomScreen},
|
||||
},
|
||||
{
|
||||
initialRouteName: "Main",
|
||||
mode: 'card',
|
||||
headerMode: "none",
|
||||
defaultNavigationOptions: {
|
||||
gestureEnabled: true,
|
||||
cardOverlayEnabled: true,
|
||||
...TransitionPresets.SlideFromRightIOS,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the drawer navigation stack
|
||||
*/
|
||||
function createDrawerNavigatorWithInitialRoute(initialRoute: string) {
|
||||
return createDrawerNavigator({
|
||||
Main: createDrawerStackWithInitialRoute(initialRoute),
|
||||
}, {
|
||||
contentComponent: Sidebar,
|
||||
initialRouteName: 'Main',
|
||||
|
|
|
@ -27,8 +27,8 @@ const ProximoStack = createStackNavigator({
|
|||
ProximoListScreen: {screen: ProximoListScreen},
|
||||
ProximoAboutScreen: {
|
||||
screen: ProximoAboutScreen,
|
||||
navigationOptions: ({ navigation }) => ({
|
||||
...TransitionPresets.ModalPresentationIOS,
|
||||
navigationOptions: () => ({
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
@ -54,7 +54,7 @@ const ProxiwashStack = createStackNavigator({
|
|||
defaultNavigationOptions: {
|
||||
gestureEnabled: true,
|
||||
cardOverlayEnabled: true,
|
||||
...TransitionPresets.ModalPresentationIOS,
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -69,7 +69,7 @@ const PlanningStack = createStackNavigator({
|
|||
defaultNavigationOptions: {
|
||||
gestureEnabled: true,
|
||||
cardOverlayEnabled: true,
|
||||
...TransitionPresets.ModalPresentationIOS,
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -84,7 +84,7 @@ const HomeStack = createStackNavigator({
|
|||
defaultNavigationOptions: {
|
||||
gestureEnabled: true,
|
||||
cardOverlayEnabled: true,
|
||||
...TransitionPresets.ModalPresentationIOS,
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ export default class PlanningDisplayScreen extends React.Component<Props> {
|
|||
<Container>
|
||||
<CustomHeader
|
||||
navigation={nav}
|
||||
title={i18n.t('screens.planningDisplayScreen')}
|
||||
title={displayData.title}
|
||||
subtitle={PlanningEventManager.getFormattedTime(displayData)}
|
||||
hasBackButton={true}/>
|
||||
<Content padder>
|
||||
|
|
Loading…
Reference in a new issue