mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Change StatusBar default style handling strategy
Summary:
Changelog: [Android] - Change StatusBar style handling strategy
Previously Android status bar can set to `dark-content` or `default`, I made the following changes:
- Added `light-content` to get align with iOS
- Changed the behavior of `default` from setting status bar with 'SYSTEM_UI_FLAG_LIGHT_STATUS_BAR' to not doing anything, I did this because 1, `setStyle('default')` is found called even without explicitly declared <StatusBar> on that surface, which I think should fail silently 2, my idea is that user should set status bar style to `dark-content` or `light-content` explicitly instead of using `default`.
- Fixed the bug found in Dating Settings's Second Look.
Reviewed By: RSNara
Differential Revision: D24714152
fbshipit-source-id: 76e7d0d45fd3b8c3733efaee81426f5f449cc7d8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b141dd7008
commit
7324b92dc4
+1
-1
@@ -194,7 +194,7 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec {
|
||||
int systemUiVisibilityFlags = decorView.getSystemUiVisibility();
|
||||
if ("dark-content".equals(style)) {
|
||||
systemUiVisibilityFlags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
} else {
|
||||
} else if ("light-content".equals(style)) {
|
||||
systemUiVisibilityFlags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
}
|
||||
decorView.setSystemUiVisibility(systemUiVisibilityFlags);
|
||||
|
||||
Reference in New Issue
Block a user