android - Statusbar color doesn't set properly on Meizu PRO 6 -
i got device-specific problem meizu pro 6 / android 6.0
i try set statusbar color defining colorprimarydark
in theme file
when set #ff0000
(red) works fine
but when set #000000
(black) doesn't apply (as see, color same colorprimary
)
the same code run on lg nexus 5x:
what go wrong here? , how can fixed?
suppose current device has kind of color filtering statusbar, maybe allows colors, lighter colorprimary
or this...
the problem meizu has custom launcher , it's own implementation.
for me
getwindow().setstatusbarcolor(color); actionbar.setbackgrounddrawable(new colordrawable(color));
works ok. when tried use in activity not in focus yet didn't work.
but workaround (see snipet below) works . update colors when activity has focus
@override public void onwindowfocuschanged(boolean hasfocus) { super.onwindowfocuschanged(hasfocus); if (hasfocus) { //... code colorization } }
Comments
Post a Comment