1.values-styles:(设置成NoActionBar)
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style>
2.compile 'com.gyf.barlibrary:barlibrary:2.2.9'
3.
//设置沉浸式 ImmersionBar.with(this).init(); ImmersionBar.with(this).transparentStatusBar().fullScreen(true).destroy();