Skip to content

Commit 9942c49

Browse files
committed
Always apply systemBarsBehavior
1 parent d205265 commit 9942c49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

android/src/main/java/com/zoontek/rnedgetoedge/EdgeToEdgeModuleImpl.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ object EdgeToEdgeModuleImpl {
8989
}
9090
}
9191

92-
// re-apply WindowInsetsController systemBarsBehavior when app gains focus
92+
// re-apply WindowInsetsController systemBarsBehavior each time
9393
// see https://github.com/zoontek/react-native-edge-to-edge/issues/66
9494
insetsController.systemBarsBehavior =
9595
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
@@ -104,6 +104,9 @@ object EdgeToEdgeModuleImpl {
104104
val window = activity.window
105105
val insetsController = WindowInsetsControllerCompat(window, window.decorView)
106106

107+
insetsController.systemBarsBehavior =
108+
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
109+
107110
insetsController.isAppearanceLightStatusBars = when (style) {
108111
"dark-content" -> true
109112
"light-content" -> false
@@ -121,6 +124,9 @@ object EdgeToEdgeModuleImpl {
121124
val window = activity.window
122125
val insetsController = WindowInsetsControllerCompat(window, window.decorView)
123126

127+
insetsController.systemBarsBehavior =
128+
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
129+
124130
insetsController.isAppearanceLightNavigationBars = when (style) {
125131
"dark-content" -> true
126132
"light-content" -> false

0 commit comments

Comments
 (0)