Android Notification Bar White with Black Icons - Programatically
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
Window window = this.getWindow(); | |
// clear FLAG_TRANSLUCENT_STATUS flag: | |
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
// add FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag to the window | |
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | |
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); | |
// finally change the color | |
window.setStatusBarColor(ContextCompat.getColor(this, R.color.window_background)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment