android how to change / reset status bar colorrefual:ot retturi.compublic static void changeStatusBarColor(Activity context, boolean change, int color){
Window window = context.getWindow();
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if(change){
// change the color of status bar
defaultStatusBarColor = window.getStatusBarColor();
window.setStatusBarColor(color);
}
else{
// reset the color of status bar
window.setStatusBarColor(defaultStatusBarColor);
}
}