Skip to content

Commit

Permalink
fix: keep status bar from hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Oct 27, 2023
1 parent 847540d commit c39cc26
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"adbSocket": "localhost:5037",
"autoStartADB": true,
"staleBuild": "warn",
"targetDevice": "",
"targetDevice": "emulator-5554",
"manifestFile": "${workspaceRoot}/android/app/src/main/AndroidManifest.xml",
"pmInstallArgs": ["-r"],
"launchActivity": ".MainActivity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void immersive(Promise promise) {
@ReactMethod
public void stickyImmersive(Boolean enabled, Promise promise) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
int visibility = WindowInsets.Type.navigationBars() | WindowInsets.Type.statusBars();
int visibility = WindowInsets.Type.navigationBars();
if (enabled) {
setSystemInsetsController(visibility, INSETS_TYPE_HIDE, promise);
setSystemInsetsController(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE, INSETS_TYPE_BEHAVIOR, promise);
Expand Down
Loading

0 comments on commit c39cc26

Please sign in to comment.