Android : status bar color change for API level below 21

Binil Surendran picture Binil Surendran · Dec 4, 2015 · Viewed 21k times · Source

I am trying change status bar color for API level lower than 21.By changing the color primary in Theme style we can change the color in status bar for the API level 21.

Playstore

I am looking for how to change the status bar color for lower version

Can any one please help me ?

Answer

Netero picture Netero · Dec 4, 2015

Changing the color of statusbar is available from Lollipop

but actually you could change the color of statusbar for Api >= 19

inside the style of value-v19 put

<?xml version="1.0" encoding="utf-8"?>
<resources>

        <style name="AppTheme" parent="MaterialDrawerTheme.Light">
                <!-- Customize your theme here. -->
                <item name="android:windowNoTitle">true</item>
                <item name="android:windowTranslucentStatus">true</item>
                .....
        </style>
</resources>

the background color of the status bar will became transparent color, and for coloring it you just put a background color in your to your app so the status bar will take that color

hope that was clear and helpful