Search code examples
reactjsreact-nativedrawerlayout

Disable swipe in DrawerLayoutAndroid


I am using DrawerLayoutAndroid in my project. I would like to disable the swipe feature on Drawer so in that case it should not open on close on swipe. How could that be done?


Solution

  • Just add this prop to your DrawerLayoutAndroid component:

    drawerLockMode = 'locked-closed'
    

    The above code will not allow your drawer component to respond to any gesture

    Cheers:)