This commit saves navBar component props in propsRegistry and restores the saved props
when the component is mounted, allowing us to pass unserializable props to custom navBar component.
(Android) Allow disableOpenGesture right or left in the drawer (#2189)
This pull request allows you to disable the open gesture only in one side of the drawer.
```
Navigation.startSingleScreenApp({
screen: initialScreen,
drawer: {
left: {
screen: DRAWER_SCREEN,
disableOpenGesture: false,
},
right: {
screen: SIDEBAR_FILTER_SCREEN,
disableOpenGesture: true,
},
},
});
```
If we pass disableOpenGesture to the drawer root object, like this:
```
Navigation.startSingleScreenApp({
screen: initialScreen,
drawer: {
left: {
screen: DRAWER_SCREEN,
disableOpenGesture: false,
},
right: {
screen: SIDEBAR_FILTER_SCREEN,
disableOpenGesture: true,
},
disableOpenGesture: true <======
},
});
```
Then the two drawer positions would be gesture disabled and the specific disableOpenGesture would be ignored. This way we don`t introduce breaking changes.
Support passing unserializable props to custom button (#2192)
This commit applies the save props mechanism used when pushing screen
to navigator buttons as well, enabling us to pass unserializable props to buttons.
This commit adds ability to register multiple navigator event listeners:
navigator.addOnNavigatorEvent(func)
navigator.removeOnNavigatorEvent(func)
Event listeners are removed when the screen the navigator is bound to
is unmounted, calling `removeOnNavigatorEvent` isn't mandatory.
As this api conflicts with the current api, addOnNavigatorEvent can't be used
in a screen where setOnNavigatorEvent was used before.
Finish SplashActivity if it's opened over NavigationActivity
On some devices, when returning to the app from background, some launchers
open the SplashActivity over the NavigationActivity. In this case, simply finish the SplashActivity
and return the the preview NavigationActivity.
No major changes, just tweaked values a little bit.
* Fab animation duration changed to 120 (previously 200)
* Fab show animation: Scales from 0.6 to 1 (previously 0)
* Fab hide animation: Scales from 1 to 0.6 (previously 0)
* Removed alpha delay from screen animation
* TranslationY value changed from 8% to 5%
* Support showing modals with the default screen push/pop animation
* Set navigation bar color before modal is displayed
* Implement screenAnimationType property
controls animation type of all screens including modals.