You can transparent the status bar
<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
For hiding StatusBar
if (Build.VERSION.SDK_INT < 16) {
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
} else if (Build.VERSION.SDK_INT < 30) {
window.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
actionBar?.hide()
} else {
window.decorView.windowInsetsController?.hide(WindowInsets.Type.statusBars())
}
* Be the first to Make Comment