![6753057-07e9dc0f8260004c.gif](https://i-blog.csdnimg.cn/blog_migrate/840f73fa49ab5ee0f75c9a337cabd933.webp?x-image-process=image/format,png)
style属性:
![6753057-2c5e19982a04c016.png](https://i-blog.csdnimg.cn/blog_migrate/aae7f094c9a295a39abac0ff2796ee16.webp?x-image-process=image/format,png)
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中:
![6753057-bb71b6b5bf24a115.png](https://i-blog.csdnimg.cn/blog_migrate/b7c48b7c4e4ebf348276969b2aaba78c.webp?x-image-process=image/format,png)
fitsSystemWindows属性一定要加才会深入到状态栏