I am trying to make status bar transparent in my application using this code:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().setStatusBarColor(Color.TRANSPARENT);
But it doesn't work. Status bar just change a color and became grey, not transparent. Where is my mistake? How to make status bar transparent?