Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Android Notification Bar White with Black Icons - Programatically
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