O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DrawerLayoutAndroid

This component is typically used for navigation. Think of this as the place where the tabs in TabBarIOS will be made available.

The DrawerLayoutAndroid component has access to the openDrawer and closeDrawer methods responsible for its visibility. To use it, pass a ref to the component and use it to call either method.

While this component has many props available to it, we will be using just the following:

  • drawerLockMode: This is one of the three strings that determine whether the drawer responds to touch gestures, such as sliding the drawer open/closed. This does not disable the toolbar's navigation icon from opening and closing the drawer:
    • unlocked: the drawer responds to touch gestures
    • locked-closed: the drawer stays ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required