This is the code which I use for changing color of status bar icon:
window.decorView.systemUiVisibility = if (light) {
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
} else {
View.SYSTEM_UI_FLAG_VISIBLE
}
Unfortunately it does not work for Window
object of a Dialog
. Any idea why?
EDIT: It is not a duplicate of Android statusbar icons color - the link SO thread doesn't mention Dialog
s