Fixed app opening on iphoneX family(X,XS,XSMAX,XR)
When you don't have a launch image and you have a Default-812h.png file in your xcassets
(you would get a black screen)
[V2][Android] destroy views on catalyst instance destroy to fix android crash (#4147)
* fix(NavigationActivity): destroy views on catalyst instance destroy
this fixes redscreen/crash when `ReactInstaceManager#recreateReactContextInBackground()` is called
* refactor(NavigationModule): catalyst destroy without try/catch
Merge Stack child options only for current child of stack
Currently child options are applied only for visible children. During push animations, both children are visible.
If mergeOptions is called on the disappearing child during push animation, wrong options will be applied.
This commit changes the conditional so that child options are merged to stack if the child is also the current child.
This adds an Android-only flag blurOnUnmount, that if true when calling push, pop, showModal, dismisModal, as well as when true on the component's static options(passProps) { ... } return value, will cause RNN to check for any focused views when the component the flag was passed for is being unmounted, and blur said view if it exists, causing not just the view to lose focus, but also the soft keyboard to be dismissed.
We added this to our fork of RNN to tackle issues stemming from an inability to dismiss the soft keyboard on unmounting components, due to the disappear/unmount lifecycle events of the component coming too late for our keyboard dismissal calls to make it across the native<->js bridge before the component was unmounted.
As this functionality is hidden behind a flag and does not alter base functionality, and the issue it seeks to solve might have been encountered by other users of RNN, I figured I might as well submit a PR to see if there is interest in merging this back into the base.
Apply stack options when stacks are attached to BottomTabs
Currently options are applied when a view is visible. This caused some noticeable flickering when
switching to tabs for the first time.
This commit adds a new callback which ViewController can override - onAttachToParent.
StackController now uses it to apply options which prevents flickering.