White status bar issue with pre-lollipop devices

White status bar issue with pre-lollipop devices

Today while working on the new UI design for client application we found out that the status bar color is not visible in the pre-lollipop devices. And when we change the status bar transparent to take our content behind the status bar it will come as white on pre-lollipop devices.

Now the solution for this one makes two separate layouts for your pre-lollipop and lollipop devices and in the first one edit the theme for your website by adding

<item name="android:windowTranslucentStatus">false</item>

Code 

<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:popupMenuStyle">@style/PopupMenu</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowTranslucentStatus">false</item>
    </style>
</style>

Copyrights © 2016 : Oxycreations