0

I have used this tutorial Making materialdesign app using appcompact and it works great.But I have a problem with style.when I run application the notification bars background should change to colorPrimaryDark like this image enter image description here

but it does not change for me..Can you please give me some hints how to fix that?

I have tested this question but it does not work I have tested it on android 4.4.4 on sony Xperia z2

Community
  • 1
  • 1
Majid Hojati
  • 1,740
  • 4
  • 29
  • 61

3 Answers3

1

unfortunately there is no support of that functionality for previous versions of Android through the support library. (Anything before 5.0 won't work).

Amedeo Baragiola
  • 314
  • 4
  • 14
  • Thanks very much,But I have seen some applications that runs on my phone and they have changed the statusbar background..I'll attach a screen shot to my question – Majid Hojati Feb 09 '15 at 10:22
  • I'll check it out, but they do not use the support library for sure – Amedeo Baragiola Feb 09 '15 at 10:23
  • I've found out a solution for your issue: check out this library https://github.com/jgilfelt/SystemBarTint it should help you setting the bar in translucent mode so that you can draw the color underneath.. Also if you like my answer remember to accept the question, not just upvote it, it helps me gain reputation. – Amedeo Baragiola Feb 09 '15 at 10:32
1

You can't have this on pre-lollipop versions.

ColdFire
  • 6,764
  • 6
  • 35
  • 51
0

Yup! It's true that you cannot set the color of status bar in pre lollipop devices. But I have seen colorful status bar in some of the pre lollipop devices like Xiaomi's Redmi Note 4G.

Image Link: https://i.stack.imgur.com/F6MO1.png

This can be done by setting the status bar in translucent mode. Hope this was helpful :D