* Make StackNavigator keyboard aware
One thing that has always annoyed me in React Navigation is the handling of the keyboard. When a keyboard is visible on screen and a navigation action occurs (either by tapping a button or using a gesture), the keyboard tends to stay on screen until the transition completes. This feels janky and broken. On native iOS, for instance, the keyboard hides immediately when the navigation starts, and if the transition is cancelled (say, when the user releases the gesture), the keyboard reappears.
This PR introduces a "KeyboardAwareNavigator" higher order component that is enabled on the StackNavigator, unless a `disableKeyboardHandling` prop is passed into the StackNavigator's configuration.
* Set status bar in keyboard handling example
* Call gesture props in keyboard aware navigator if available
* Fix formatting
Adds a new state persistence mechanisms to all of the navigators via createNavigationContainer
There are two new props that you can provide to a navigation container: `storageKey` and `renderLoading`.
`storageKey` is the string key to be used with AsyncStorage while saving and persisting navigation state. To disable persistence, set to null.
`renderLoading` allows you to render something while the navigator re-hydrates its state and loads its initial URL. By default this returns null, but Expo users will want to render a <AppLoading /> component for smooth app launches
There is also functionality in this PR to observe errors that come from re-hydrating state, and gracefully recover by dispatching an init action.
Also this revises the init action to *reset* the navigation state, rather than preserve the previous state.
* Added possibility to provide custom header back button's image, introduced API changes: removed old prop "headerBackImage", added new prop "backImage".
* Code style fixes.
* Renamed showcase file to for more clarity; updated the prop's name as well.
* Removed listeners code from showcase screens.
* Add Flow libdef
* Move libdef to flow folder in root
* Update libdef with some refinements discovered while writing test
Mostly refining navigator config types. In the past when we tried it we got in-repo Flow errors. With a libdef we can now assert it as true!
* Get rid of all imports in libdef and refine some types
* allow transition configuration between tabs
* we don't need to pass configureTransition to TabBarComponent
* Update TabAnimations.js
* Update TabNavigator.md
* Add SafeAreaView - JS only version
* Add SafeAreaView
* Looking pretty good
* Small refactor
* Remove console.log
* Fix merge conflict with Header flow types.
* Fix conflict with itemsContainerStyle.
* Fix merge conflict.
* Fix merge conflict, yarn and package.json from fixflow
* Fix merge conflict, navigation playground yarn.lock and package.json with fixflow
* Now it can work on lower versions of RN
* Snapshots merge conflict.
* Update DrawerNavigator snapshot.
* Fix conflict with iconContainerStyle
* Add support for correct status bar height on iPad.
* Update jest snapshots.
* Update StackNavigator snapshot.
* Use modulo instead of while
* Fix landscape tab bar width on < iOS 11
* Fixes default drawerWidth to match material ui patterns.
Previously: calculated based on device width regardless of orientation and did not recalculate when orientation changed.
Now: calculates based on minimum of device height/width, remains constant and guaranteed to always fit screen regardless of orientation.
This is the expected behavior based on observing Google apps (e.g. Gmail). This is also better than recalculating on every orientation change, which would result in variable width drawers and awkward empty space when in landscape in most cases.
* Remove console.log
* [Playground] Duplicate StacksInTabs to StacksOverTabs
* [Playground] Move nested routes into root stack so they appear on top
* [Playground] Go to SettingsTab instead of pushing a new Settings screen