Window dialogWindow = aDialog.getWindow();
//全屏且显示透明状态栏
dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
dialogWindow.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
dialogWindow.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
dialogWindow.setStatusBarColor(Color.TRANSPARENT);
}
网友评论