0

I have received a design spec. in which the status bar icons' color is to be changed completely. I know I can change the status bar color in theme, however that is not my question. I want to override the icon color/icons themselves as shown in the image attached.

enter image description here

I searched a bit but could not find a way to do it. I am aware that as a last resort, I can change the existing status bar icon tintcolor the following attribute in my app theme.

<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>

JaydeepW
  • 3,237
  • 1
  • 25
  • 27
  • this link may help you [statusbar icons color](https://stackoverflow.com/questions/30075827/android-statusbar-icons-color) – AskNilesh Aug 22 '17 at 07:42
  • 2
    Possible duplicate of [Android statusbar icons color](https://stackoverflow.com/questions/30075827/android-statusbar-icons-color) – M.Fakhri Aug 22 '17 at 07:49

1 Answers1

-1

You can change it by setting the android:statusBarColor or android:colorPrimaryDark attribute of the style you're using for your app in styles.xml.

(android:statusBarColor inherits the value of android:colorPrimaryDark by default)

For example (since we're using an AppCompat theme here, the android namespace is omitted):

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimaryDark">@color/your_custom_color</item>
</style>

On API level 21+ you can also use the Window.setStatusBarColor() method from code.

<item name="colorPrimaryDark">@color/your_color</item> 

will only be visible in Lollipop and greater than Lollipop(API) devices. P.S. you need to have Theme.AppCompat as your base/main theme

RaffaD
  • 361
  • 1
  • 12
  • I have mentioned in the question that I am aware this can be done. Question is something different. – JaydeepW Aug 22 '17 at 08:33