Our application utilizes a Navigation Drawer to display the side menu. However, there are certain screens where we do not want this navigation drawer to appear when the user performs left or right gestures.
We have attempted to hide these particular screens from the drawer interaction by utilizing code like drawerLockMode:"locked-closed"
and disableOpenGesture: true
, but unfortunately, they have not been successful in preventing the drawer from opening upon swipe gestures.
const AppNavigator = StackNavigator(
{
// Drawer: { screen: Drawer },
Register: {
screen: Register,
navigationOptions: ({ navigation }) => ({
drawerLockMode: "locked-closed",
})
},
TabHome: { screen: TabHome },
Album: { screen: Album },
offlineContent: { screen: offlineContent },
changePassword: { screen: changePassword },
Player: {screen: Player},
},
{
initialRouteName: "TabHome",
// header: null
}
);
It should be noted that I am using version "react-navigation": "^3.0.9"
.
Do you have any suggestions on how to effectively disable the navigation drawer from being opened by gestures?