DrawerLayoutAndroid#keyboardDismissMode

keyboardDismissMode enum('none', 'on-drag') Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'on-drag', the keyboard is dismissed when a drag begins.

DrawerLayoutAndroid#drawerWidth

drawerWidth number Specifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window.

DrawerLayoutAndroid#drawerPosition

drawerPosition enum(DrawerConsts.DrawerPosition.Left, DrawerConsts.DrawerPosition.Right) Specifies the side of the screen from which the drawer will slide in.

DrawerLayoutAndroid#drawerLockMode

drawerLockMode enum('unlocked', 'locked-closed', 'locked-open') Specifies the lock mode of the drawer. The drawer can be locked in 3 states: - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures. - locked-closed, meaning that the drawer will stay closed and not respond to gestures. - locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (openDrawer/closeDrawer).

DrawerLayoutAndroid#drawerBackgroundColor

drawerBackgroundColor color Specifies the background color of the drawer. The default value is white. If you want to set the opacity of the drawer, use rgba. Example: return ( <DrawerLayoutAndroid drawerBackgroundColor="rgba(0,0,0,0.5)"> </DrawerLayoutAndroid> );

DrawerLayoutAndroid#closeDrawer()

closeDrawer() Closes the drawer.

Direct Manipulation

It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile apps. setNativeProps is the React Native equivalent to setting properties directly on a DOM node. Use setNativeProps when frequent re-rendering creates a performance bottleneck Direct manipulation will not be a tool that you

Dimensions.set()

static set(dims) This should only be called from native code by sending the didUpdateDimensions event. @param {object} dims Simple string-keyed object of dimensions to set

Dimensions.get()

static get(dim) Initial dimensions are set before runApplication is called so they should be available before any other require's are run, but may be updated later. Note: Although dimensions are available immediately, they may change (e.g due to device rotation) so any rendering logic or styles that depend on these constants should try to call this function on every render, rather than caching the value (for example, using inline styles rather than setting a value in a StyleSheet). Example:

Debugging

Debugging React Native Apps To access the in-app developer menu: On iOS shake the device or press control + ⌘ + z in the simulator. On Android shake the device or press hardware menu button (available on older devices and in most of the emulators, e.g. in genymotion you can press ⌘ + m or F2 to simulate hardware menu button click). You can also install Frappé, a tool for OS X, which allows you to emulate shaking of devices remotely. You can use ⌘ + Shift + R as a shortcut to trigger a shake f