-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
🐛 Bug Report
StatusBar component resets its props when application was reopened on Android.
There are similar issues #19609, #16582 that were marked as closed.
But suggested ways of resolving aren't work for me.
I attach a demo of what actually happening.
I set translucent and orange background color for the StatusBar and start the application. "Welcome to React Native!" text was hidden behind the status bar. Then I pressed the home button and reopened the application again. StatusBar component lost translucent and background color "Welcome to React Native!" text located below the status bar.
To Reproduce
- Initialize a new React Native project with react-native init
- Add StatusBar component with translucent and background color
- Start the application with react-native run-android
- Press Home button
- Reopen the application
Expected Behavior
StatusBar component should keep its state when the application was reopened.
Code Example
Add the following StatusBar component:
<StatusBar backgroundColor={'orange'} translucent={true} />
Full code example repo: statusBarTest
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 52.02 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.13.0 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.1, 25.0.2, 26.0.1, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.5 => 0.59.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-rename: 2.2.2