Created
May 1, 2020 21:25
-
-
Save Shivamdhuria/481678933c8fd60c84cb90abb5a626a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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