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:
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
Post a Comment