? ? ? style屬性:
? ? activity中:
if(Build.VERSION.SDK_INT>=21) {
? ? ?View decorView = getWindow().getDecorView();
? ? ?intoption = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
? ? ?decorView.setSystemUiVisibility(option);
? ? ?getWindow().setStatusBarColor(Color.TRANSPARENT);
}
xml中:
fitsSystemWindows屬性一定要加才會深入到狀態(tài)欄