现在安卓主流的屏下摄像头,或者水滴屏的手机
为什么设置了全屏之后状态栏就变黑了,
怎么样才能设置成沉浸式的全屏模式呢
隐藏insets
private void hideStatusBar() {
WindowInsetsController windowInsetsController = getWindow().getDecorView().getWindowInsetsController();
assert windowInsetsController != null;
windowInsetsController.hide(WindowInsets.Type.statusBars());
}