react-native/RNTester/js
Tadeu Valentt 076b1cea35 Prevent show a hidden status bar when opening modals, fix #7474
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Closes the old #7474, keeping the status bar hidden when displaying a modal
or dialog, this is accomplished by verifying if the activity status bar is hidden or not.

Added a test to [RNTester](https://github.com/facebook/react-native/tree/master/RNTester), so it can be tested from there:

1. Run [RNTester](https://github.com/facebook/react-native/tree/master/RNTester) project
2. Go to <StatusBar> tests
3. Set `hidden: true` in the *StatusBar hidden* samples
4. Set `modal visible: true` and see the result

Here are some gifs to help see the results:
![fail](https://user-images.githubusercontent.com/1649955/36345378-f443ad7e-1407-11e8-850d-d6317fb34da4.gif)
![success](https://user-images.githubusercontent.com/1649955/36345392-1c590b56-1408-11e8-9244-a2e828f579ab.gif)

none

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[ GENERAL  ]   [ BUGFIX      ]   [ [StatusBar] - Prevent show a hidden status bar when opening modals
 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[ GENERAL  ]   [ BUGFIX      ]   [StatusBar] - Prevent show a hidden status bar when opening modals
Closes https://github.com/facebook/react-native/pull/18004

Differential Revision: D7307564

Pulled By: hramos

fbshipit-source-id: 47e481ead78204865811ddf2ef3d27da77ad8b8f
2018-03-16 16:46:42 -07:00
..
AnimatedGratuitousApp Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Thumbnails Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
ARTExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AccessibilityAndroidExample.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AccessibilityIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ActionSheetIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ActivityIndicatorExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AlertExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AlertIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AnimatedExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AppStateExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AssetScaledImageExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
AsyncStorageExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
BorderExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
BoxShadowExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ButtonExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
CameraRollExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
CameraRollView.js @allow-large-files Upgrade xplat/js to Flow v0.66 2018-02-16 20:24:57 -08:00
CheckBoxExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ClipboardExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DatePickerAndroidExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DatePickerIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DimensionsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ExampleTypes.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
FlatListExample.js Don't wrap ListEmptyComponent in an extra view 2018-03-13 18:11:31 -07:00
GeolocationExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ImageCapInsetsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ImageEditingExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ImageExample.js Support Image resizeMode=repeat on Android 2018-03-12 16:14:18 -07:00
InputAccessoryViewExample.js Replace js Dimensions with shadow view in InputAccessoryViewExample 2018-03-15 10:14:15 -07:00
KeyboardAvoidingViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
LayoutAnimationExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
LayoutEventsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
LayoutExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
LinkingExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ListExampleShared.js Don't wrap ListEmptyComponent in an extra view 2018-03-13 18:11:31 -07:00
ListViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ListViewGridLayoutExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ListViewPagingExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
MaskedViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ModalExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
MultiColumnExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
NativeAnimationsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
NavigatorIOSBarStyleExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
NavigatorIOSColorsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
NavigatorIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
NetInfoExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
OrientationChangeExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PanResponderExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PermissionsExampleAndroid.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PickerExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PickerIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PointerEventsExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ProgressBarAndroidExample.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ProgressViewIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
PushNotificationIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RCTRootViewIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterActions.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterApp.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterApp.ios.js Fix ESLint warnings using 'yarn lint --fix' 2018-02-22 07:23:17 -08:00
RNTesterBlock.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterButton.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterExampleContainer.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterExampleList.js StyleObj -> DangerouslyImpreciseStyleProp 2018-03-07 13:24:20 -08:00
RNTesterList.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterList.ios.js Added InputAccessoryView demo to RNTester [2/N] 2018-02-27 17:56:48 -08:00
RNTesterNavigationReducer.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterPage.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterSettingSwitchRow.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterStatePersister.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RNTesterTitle.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RTLExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RefreshControlExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
RootViewSizeFlexibilityExampleApp.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SafeAreaViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ScrollViewExample.js StyleObj -> DangerouslyImpreciseStyleProp 2018-03-07 13:24:20 -08:00
ScrollViewSimpleExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SectionListExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SegmentedControlIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SetPropertiesExampleApp.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ShareExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SliderExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SnapshotExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
StatusBarExample.js Prevent show a hidden status bar when opening modals, fix #7474 2018-03-16 16:46:42 -07:00
SwipeableFlatListExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SwipeableListViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
SwitchExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TVEventHandlerExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TabBarIOSBarStyleExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TabBarIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TextExample.android.js Implement letterSpacing on Android >= 5.0 2018-02-27 14:53:58 -08:00
TextExample.ios.js Implement letterSpacing on Android >= 5.0 2018-02-27 14:53:58 -08:00
TextInputExample.android.js Implement letterSpacing on Android >= 5.0 2018-02-27 14:53:58 -08:00
TextInputExample.ios.js Support Input Accessory View (iOS Only) [1/N] 2018-02-27 11:09:30 -08:00
TimePickerAndroidExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TimerExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ToastAndroidExample.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ToolbarAndroidExample.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ToolbarAndroidExample.ios.js workaround android-only js module resolution issue 2018-02-28 19:44:58 -08:00
TouchableExample.js onPress animation with magnification 2018-02-27 13:10:02 -08:00
TransformExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
TransparentHitTestExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
URIActionMap.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
VibrationExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
VibrationIOSExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
ViewPagerAndroidExample.android.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
WebSocketExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
WebViewExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExample.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleBinaryUpload.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleCookies.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleDownload.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleFetch.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleFormData.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleHeaders.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
XHRExampleOnTimeOut.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
bunny.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
createExamplePage.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
flux@3x.png fixed image in RNTester snapshot example 2017-08-31 15:16:05 -07:00
hawk.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
helloworld.html Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
http_test_server.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00
imageMask.png MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
messagingtest.html Typos in comments and log messages 2018-01-12 22:18:45 -08:00
relay@3x.png fixed image in RNTester snapshot example 2017-08-31 15:16:05 -07:00
slider-left.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
slider-left@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
slider-right.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
slider-right@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
slider.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
slider@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
uie_comment_highlighted@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
uie_comment_normal@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
uie_thumb_big.png Revert D5189017: [RN] Native implementation of <Image> intrinsic content size on iOS 2017-10-25 08:20:48 -07:00
uie_thumb_normal@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
uie_thumb_selected@2x.png Re-license and rename UIExplorer integration test app as RNTester 2017-05-08 11:31:19 -07:00
websocket_test_server.js Update license headers for MIT license 2018-02-16 18:31:53 -08:00