diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 4841d5c0..33df071a 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -202,6 +202,7 @@ public class ReactExoplayerView extends FrameLayout implements private long resumePosition; private boolean loadVideoStarted; private boolean isFullscreen; + private boolean originalFitsSystemWindows; private boolean isInBackground; private boolean isPaused; private boolean isBuffering; @@ -2238,6 +2239,7 @@ public class ReactExoplayerView extends FrameLayout implements fullScreenPlayerView.show(); } UiThreadUtil.runOnUiThread(() -> { + originalFitsSystemWindows = window.getDecorView().getFitsSystemWindows(); WindowCompat.setDecorFitsSystemWindows(window, false); controller.hide(WindowInsetsCompat.Type.systemBars()); controller.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE); @@ -2251,7 +2253,7 @@ public class ReactExoplayerView extends FrameLayout implements setControls(controls); } UiThreadUtil.runOnUiThread(() -> { - WindowCompat.setDecorFitsSystemWindows(window, true); + WindowCompat.setDecorFitsSystemWindows(window, originalFitsSystemWindows); controller.show(WindowInsetsCompat.Type.systemBars()); eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke(); });