File tree Expand file tree Collapse file tree
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ private fun Window.statusBarShow() {
106106internal fun Window.enableEdgeToEdge () {
107107 WindowCompat .enableEdgeToEdge(this )
108108
109+ val controller = WindowInsetsControllerCompat (this , decorView)
109110 val isDarkMode = UiModeUtils .isDarkMode(context)
110111
111112 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .Q ) {
@@ -120,12 +121,12 @@ internal fun Window.enableEdgeToEdge() {
120121 }
121122
122123 if (isNavigationBarContrastEnforced) {
123- WindowInsetsControllerCompat ( this , decorView) .isAppearanceLightNavigationBars = ! isDarkMode
124+ controller .isAppearanceLightNavigationBars = ! isDarkMode
124125 }
125- } else if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
126- navigationBarColor = if (isDarkMode) DarkNavigationBarColor else LightNavigationBarColor
127126 } else {
128- navigationBarColor = DarkNavigationBarColor
127+ val isAppearanceLight = Build .VERSION .SDK_INT >= Build .VERSION_CODES .O && ! isDarkMode
128+ navigationBarColor = if (isAppearanceLight) LightNavigationBarColor else DarkNavigationBarColor
129+ controller.isAppearanceLightNavigationBars = isAppearanceLight
129130 }
130131}
131132
You can’t perform that action at this time.
0 commit comments