I want to have a transparent statusBar in the light style like this
I tried this code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
this.window.apply {
clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
statusBarColor = ContextCompat.getColor(applicationContext, R.color.transparent)
}
}
but I can't add decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
for change text color of statusBar because I add SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
after that I used setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS)
in this answer but my activity go under the back button like this