How can I make the status bar white with black icons?

Jon picture Jon · Dec 23, 2014 · Viewed 66.2k times · Source

I want to change the colour of the status bar for my app so that it's white with black icons (instead of the default black with white icons). Is there any way of doing this?

Answer

bugraoral picture bugraoral · Aug 12, 2015

With Android M (api level 23) you can achieve this from theme with android:windowLightStatusBar attribute.

Edit :

Just as Pdroid mentioned, this can also be achieved programatically:

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);