windowlightstatusbar programmatically android code example
Example: android:windowLightStatusBar programmatically
if (on) {
View view = getWindow().getDecorView();
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} else {
View view = getWindow().getDecorView();
view.setSystemUiVisibility(view.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}