android - How to get lollipop status bar on kitkat -


i'm trying achieve status bar primarydarkcolor , primarycolor lollipop on kitkat , here try:

<style name="populartheme" parent="theme.appcompat.light.darkactionbar">     <item name="colorprimarydark">@color/colorprimarydarkpopular</item>     <item name="colorprimary">@color/colorprimarypopular</item>      <!--here i've added try transparency -->     <item name="android:statusbarcolor">@android:color/transparent</item>     <item name="android:windowactionbaroverlay">true</item>     <item name="android:windowcontenttransitions">true</item>     <item name="android:windowtranslucentnavigation">true</item>     <item name="android:windowtranslucentstatus">true</item> </style> 

also, test method https://github.com/jgilfelt/systembartint won't choice because i'm using color each activity.

how achieve status bar primarydarkcolor , primarycolor in kitkat?

result:

enter image description here

i've checked here on app work @ how it.

first remove under <!--here i've added try transparency -->, have nothing of on our style. works appcompat theme or activity you.

and add rule kitkat:

@targetapi(build.version_codes.kitkat) private static void setupwindowkikat(window window) {    window.addflags(windowmanager.layoutparams.flag_translucent_status); } 

and call activity:

if (build.version.sdk_int >= build.version_codes.kitkat &&     build.version.sdk_int < build.version_codes.lollipop)      setupwindowkikat(getwindow()); 

it possible can add values-v19\style.xml above it's how it's on our app. hope helps.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -