I set up a project and want to work with Material design. As the app should be compatible with APIs lower than 21, I use appcompat. Unfortunately I cannot change the color of the status bar.
I already read: How to change the status bar color in android And: https://chris.banes.me/2014/10/17/appcompat-v21/
My Layout is android.support.v4.widget.DrawerLayout. The color of the ActionBar changes, but not of the status bar. My xml:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/green500</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/green900</item>
</style>