Skip to content

Commit d34a75e

Browse files
Vegas Murphyfacebook-github-bot
Vegas Murphy
authored andcommitted
Fix layout in casting screen
Summary: Changelog: [Android][Fixed] - Fix StatusBar not updating to use translucent values when set to the same value across different activities With native nav we open routes in a new activity. Each activity has its own StatusBar configured so we need to ensure it is configured properly. Currently since the statusBar RN component avoids changing the StatusBar if the value hasn't changed it never gets updated and doesn't become translucent this results in all our padding being off since we add padding to account for the status bar Reviewed By: yungsters Differential Revision: D34810143 fbshipit-source-id: 5e382026fb89542fe0c8f6ab396f2fbeedee7a05
1 parent 31f0796 commit d34a75e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Libraries/Components/StatusBar/StatusBar.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ class StatusBar extends React.Component<Props> {
471471
if (!oldProps || oldProps.hidden.value !== mergedProps.hidden.value) {
472472
NativeStatusBarManagerAndroid.setHidden(mergedProps.hidden.value);
473473
}
474-
if (!oldProps || oldProps.translucent !== mergedProps.translucent) {
474+
// Activities are not translucent by default, so always set if true.
475+
if (
476+
!oldProps ||
477+
oldProps.translucent !== mergedProps.translucent ||
478+
mergedProps.translucent
479+
) {
475480
NativeStatusBarManagerAndroid.setTranslucent(mergedProps.translucent);
476481
}
477482
}

0 commit comments

Comments
 (0)