diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java b/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java index fbc0412d787..9feab908f3e 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +++ b/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java @@ -136,15 +136,18 @@ private void setTextColorScheme(StatusBarOptions statusBar) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return; final View view = activity.getWindow().getDecorView(); + //View.post is a Workaround, added to solve internal Samsung + //Android 9 issues. For more info see https://github.com/wix/react-native-navigation/pull/7231 + view.post(()->{ + int flags = view.getSystemUiVisibility(); + if (isDarkTextColorScheme(statusBar)) { + flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; + } else { + flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; + } - int flags = view.getSystemUiVisibility(); - if (isDarkTextColorScheme(statusBar)) { - flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; - } else { - flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; - } - - view.setSystemUiVisibility(flags); + view.setSystemUiVisibility(flags); + }); } private void mergeStatusBarOptions(View view, StatusBarOptions statusBar) {