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?
Step 1: After opening the android studio and creating a new project with an empty activity. Step 2: Navigate to res/values/colors. xml, and add a color that you want to change for the status bar.
A recent update to the Google application caused an aesthetic issue with the font and symbols turning black on the notification bar. By uninstalling, reinstalling, and updating the Google application, this should allow the white text/symbols to return to the notification bar on the home screen.
To customize it, first pull down the slider bar from the top of the screen. Next, tap on the three vertical dots in the top right corner. Now click on Status bar. You're in.
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);
It is possible to make the white status bar with grey icons e.g. this way for SDK >= 23 (see docs):
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:windowLightStatusBar">true</item> </style>
in your styles.xml and set the colorPrimary
to white or programmatically:
getWindow().setStatusBarColor(Color.WHITE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With