Try this in styles.xml(v21)
<name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:windowTranslucentStatus">true</item>
Update
You can achieve the same effect programmatically on KitKat, and then check this box in the window.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w = getWindow(); // in Activity onCreate() for instance w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); }
If you set a background resource (for example, color or image) to the layout, you will see the color or image โbelowโ in the status bar.
<item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@color/primary_dark</item>
A source
source share