I want to set the color of status bar to white and icons such as wifi and battery to black. How can I do this?. I will prefer to do this via using Theme.AppCompat
Asked
Active
Viewed 1,659 times
0
-
Try to look here https://stackoverflow.com/questions/22192291/how-to-change-the-status-bar-color-in-android – yuzuriha Dec 27 '17 at 02:02
-
@leyreyyan I tried this by doing this
- @color/white
but I want to change the color of battery ,wifi etc icons into black. – Dec 27 '17 at 02:13
2 Answers
0
You can change your statusBarColor by typing below attribute in your style.xml you need to input this code in your base theme.
<item name="android:statusBarColor">COLOR THAT YOU WANT TO CHANGE</item>

Philip Kim
- 97
- 10
0
The color of the status bar can be changed by :
<item name="colorPrimaryDark">your_required_color</item>
From API 21, to change color of status bar without using "colorPrimaryDark" use:
<item name="android:statusBarColor">your_required_color</item>
Since Lollipop. Starting with Android 5.0, the guidelines say:
Notification icons must be entirely white.
Even if they're not, the system will only consider the alpha channel of your icon, rendering them white
Refer this : Android statusbar icons color
But from API 23, to change system status icons to semitransparent black you can use :
<item name="android:windowLightStatusBar">true</item>
Refer this : https://plus.google.com/+RomanNurik/posts/4WBSonAZxt1

Sonu Sanjeev
- 944
- 8
- 9