I'm having the hardest time changing the color beneath the transparent status bar color. The transparency is fine when the drawer is open, but the color beneath is wrong. Different fragments are going to have different action bar colors.
fitsSystemWindow
has no effect.
Changing the status bar color just makes it solid.
If I set a color with a lower alpha, it just mixes with the green (Primary Color Dark).
What is happening: (Color underneath is green)
What I want is exactly like what is happening in the play store:
The following should do what you want:
First make sure that your app theme in v21/style.xml
has
<item name="android:windowTranslucentStatus">true</item>
Use mDrawerLayout.setStatusBarBackgroundColor()
for changing the background color of statusBar
on fragment change instead of setStatusBarColor()
.
Make sure your coordinatorLayout
doesn't contain the property android:fitsSystemWindows
.