Moussawi7 Moussawi7 - 1 year ago 166
Android Question

React Native :Disable Android Drawer

I am using DrawerLayout as a part of my project, but i don't want to give the user the ability to open the drawer in some pages, and I cannot find an option to disable it.
any trick with that?.

this is a portion of my code:

return (
renderNavigationView={() => navigationView}>
<Router hideNavBar={true}>
<Schema name="default" sceneConfig={Navigator.SceneConfigs.FloatFromRight}/>
<Route initial={true} name="empty" component={Empty}/>
<Route name="login" component={Login} onLoginSuccess={()=>{this.onLoginSuccess()}}/>
<Route name="pages">
<Router footer={Footer} header={Header} hideNavBar={true}>
<Route name="issues" initial={true} component={Issues} title={"123"}/>
<Route name="analytics" component={Analytics} title={"456"}/>

Answer Source

There is a new prop drawerLockMode in 0.22.0-rc that allows to lock the drawer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download