feat(android): set originalFitsSystemWindows on fullscreen open (#4013)
This commit is contained in:
parent
7611da155f
commit
2f70c02cdc
@ -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();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user