fix(android): show the status bar and navigation bar after exiting full-screen mode (#4112)
* fix(android): show the status bar and navigation bar after exiting full-screen mode
This commit is contained in:
parent
308447a5ba
commit
8b8ebe9410
@ -2277,10 +2277,6 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
fullScreenPlayerView.show();
|
fullScreenPlayerView.show();
|
||||||
}
|
}
|
||||||
UiThreadUtil.runOnUiThread(() -> {
|
UiThreadUtil.runOnUiThread(() -> {
|
||||||
originalFitsSystemWindows = window.getDecorView().getFitsSystemWindows();
|
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false);
|
|
||||||
controller.hide(WindowInsetsCompat.Type.systemBars());
|
|
||||||
controller.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
|
|
||||||
eventEmitter.onVideoFullscreenPlayerDidPresent.invoke();
|
eventEmitter.onVideoFullscreenPlayerDidPresent.invoke();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -2291,8 +2287,6 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
setControls(controls);
|
setControls(controls);
|
||||||
}
|
}
|
||||||
UiThreadUtil.runOnUiThread(() -> {
|
UiThreadUtil.runOnUiThread(() -> {
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, originalFitsSystemWindows);
|
|
||||||
controller.show(WindowInsetsCompat.Type.systemBars());
|
|
||||||
eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke();
|
eventEmitter.onVideoFullscreenPlayerDidDismiss.invoke();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user