Skip to content

Instantly share code, notes, and snippets.

@Shivamdhuria
Created May 1, 2020 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shivamdhuria/481678933c8fd60c84cb90abb5a626a5 to your computer and use it in GitHub Desktop.
Save Shivamdhuria/481678933c8fd60c84cb90abb5a626a5 to your computer and use it in GitHub Desktop.
var flags = SYSTEM_UI_FLAG_LAYOUT_STABLE or
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
//Changing status bar icons color should be easily be done by setting "android:windowLightStatusBar" item to true in Day Theme and false
// in night Theme but it seems to be broken for now if above flags are set. :(
if (!isDarkTheme(this)) {
flags = flags or SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
}
window.decorView.systemUiVisibility = flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment