📜  状态栏颜色 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:07.726000             🧑  作者: Mango

代码示例2
getWindow().setStatusBarColor(ContextCompat.getColor(BookReaderActivity.this, R.color.black));
View decorView = getWindow().getDecorView(); //set status background black 
decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); //set status text  light