Related to #2892
To use it, Override `createReactNativeHost` in MainApplication as follows:
```java
@Override
protected ReactNativeHost createReactNativeHost() {
return new NavigationReactNativeHost(this) {
@Override
protected UIImplementationProvider getUIImplementationProvider() {
return new SyncUiImplementation.Provider();
}
};
}
```
This option allows to control when tab titles are displayed
* showWhenActive: when a tab is focused
* alwaysShow: show regardless of which tab is in
* alwaysHide: never show tab titles
This commit also changes the way TopTabs options are handled. As the TabLayout
is part of the TopBar, it's the StackControllers responsibility to set TopTabs options.
* V2: Peek and pop
* Add event when preview is dismissed in non commit mode
* tslint
* Refactor playground. Document preview api
* Added width prop
* Implement hybrid push/preview button
* Fixing small linting errors
* Work in progress
* Arbitary changes
* Improvements on API
* Cleanup RNNSplitViewController, allow mergeOptions
* Added documentation and better playground example
* Adding tests for coverage
* Find out why this test is failing.
* Only show split view on iOS
* Add test back in
1. Sideenus weren't clickable on Android. It seems the order in which
child views were being added to parent controllers, left or right
before center, were affecting the ability to interact with the menus.
I've changed the code to always add them in a specific order: center,
then left, then right.
I believe this closes issue #2835.
https://github.com/wix/react-native-navigation/issues/2835.
2. On Android, merging options to open a menu works.
Navigation.mergeOptions(currentComponentId, {
sideMenu: {
left: {
visible: true
}
}
})
But merging options to close it wasn't working.
Navigation.mergeOptions(currentComponentId, {
sideMenu: {
left: {
visible: false
}
}
})
3. The bottom tabs controller was reserving a margin space for the tabs
when switching from one to another, regardless of its visibility
settings.