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,22 +33,40 @@ const AboutStack = createStackNavigator({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Create a stack to use animations
|
||||||
|
function createDrawerStackWithInitialRoute(initialRoute: string) {
|
||||||
|
return createStackNavigator({
|
||||||
|
Main: createMaterialBottomTabNavigatorWithInitialRoute(initialRoute),
|
||||||
|
SettingsScreen: {screen: SettingsScreen},
|
||||||
|
AboutScreen: AboutStack,
|
||||||
|
SelfMenuScreen: {screen: SelfMenuScreen},
|
||||||
|
TutorInsaScreen: {screen: TutorInsaScreen},
|
||||||
|
AmicaleScreen: {screen: AmicaleScreen},
|
||||||
|
WiketudScreen: {screen: WiketudScreen},
|
||||||
|
ElusEtudScreen: {screen: ElusEtudScreen},
|
||||||
|
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
|
* Creates the drawer navigation stack
|
||||||
*/
|
*/
|
||||||
function createDrawerNavigatorWithInitialRoute(initialRoute: string) {
|
function createDrawerNavigatorWithInitialRoute(initialRoute: string) {
|
||||||
return createDrawerNavigator({
|
return createDrawerNavigator({
|
||||||
Main: createMaterialBottomTabNavigatorWithInitialRoute(initialRoute),
|
Main: createDrawerStackWithInitialRoute(initialRoute),
|
||||||
SettingsScreen: {screen: SettingsScreen},
|
|
||||||
AboutScreen: AboutStack,
|
|
||||||
SelfMenuScreen: {screen: SelfMenuScreen},
|
|
||||||
TutorInsaScreen: {screen: TutorInsaScreen},
|
|
||||||
AmicaleScreen: {screen: AmicaleScreen},
|
|
||||||
WiketudScreen: {screen: WiketudScreen},
|
|
||||||
ElusEtudScreen: {screen: ElusEtudScreen},
|
|
||||||
BlueMindScreen: {screen: BlueMindScreen},
|
|
||||||
EntScreen: {screen: EntScreen},
|
|
||||||
AvailableRoomScreen: {screen: AvailableRoomScreen},
|
|
||||||
}, {
|
}, {
|
||||||
contentComponent: Sidebar,
|
contentComponent: Sidebar,
|
||||||
initialRouteName: 'Main',
|
initialRouteName: 'Main',
|
||||||
|
|
|
@ -27,8 +27,8 @@ const ProximoStack = createStackNavigator({
|
||||||
ProximoListScreen: {screen: ProximoListScreen},
|
ProximoListScreen: {screen: ProximoListScreen},
|
||||||
ProximoAboutScreen: {
|
ProximoAboutScreen: {
|
||||||
screen: ProximoAboutScreen,
|
screen: ProximoAboutScreen,
|
||||||
navigationOptions: ({ navigation }) => ({
|
navigationOptions: () => ({
|
||||||
...TransitionPresets.ModalPresentationIOS,
|
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -54,7 +54,7 @@ const ProxiwashStack = createStackNavigator({
|
||||||
defaultNavigationOptions: {
|
defaultNavigationOptions: {
|
||||||
gestureEnabled: true,
|
gestureEnabled: true,
|
||||||
cardOverlayEnabled: true,
|
cardOverlayEnabled: true,
|
||||||
...TransitionPresets.ModalPresentationIOS,
|
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ const PlanningStack = createStackNavigator({
|
||||||
defaultNavigationOptions: {
|
defaultNavigationOptions: {
|
||||||
gestureEnabled: true,
|
gestureEnabled: true,
|
||||||
cardOverlayEnabled: true,
|
cardOverlayEnabled: true,
|
||||||
...TransitionPresets.ModalPresentationIOS,
|
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ const HomeStack = createStackNavigator({
|
||||||
defaultNavigationOptions: {
|
defaultNavigationOptions: {
|
||||||
gestureEnabled: true,
|
gestureEnabled: true,
|
||||||
cardOverlayEnabled: true,
|
cardOverlayEnabled: true,
|
||||||
...TransitionPresets.ModalPresentationIOS,
|
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default class PlanningDisplayScreen extends React.Component<Props> {
|
||||||
<Container>
|
<Container>
|
||||||
<CustomHeader
|
<CustomHeader
|
||||||
navigation={nav}
|
navigation={nav}
|
||||||
title={i18n.t('screens.planningDisplayScreen')}
|
title={displayData.title}
|
||||||
subtitle={PlanningEventManager.getFormattedTime(displayData)}
|
subtitle={PlanningEventManager.getFormattedTime(displayData)}
|
||||||
hasBackButton={true}/>
|
hasBackButton={true}/>
|
||||||
<Content padder>
|
<Content padder>
|
||||||
|
|
Loading…
Reference in a new issue