As per https://www.fusetools.com/learn/fuse/ux/fuse/android/statusbarconfig , I have an element to style the StatusBar on Android:
<Android.StatusBarConfig ux:Name="statusBarConfig" IsVisible="true" Color="#ff00ffff" />
While the IsVisible and IsNavigationBarVisible properties work fine, I find that the Color doesn’t change at all (always black, opacity 1).
skezo
March 11, 2016, 8:32am
2
I have the same problem. The IsVisible works but always black status bar. Tested on my s4 with lollipop.
Me too Skezo
Ok guys, if you want to change statusbar color you can use this:
[Foreign(Language.Java)]
static extern(Android) void StatusBarColor()
@{
com.fuse.Activity.getRootActivity().runOnUiThread(new Runnable()
{
public void run()
{
android.view.Window window = com.fuse.Activity.getRootActivity().getWindow();
window.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//window.setStatusBarColor(0x00000000); //transparent
//window.setStatusBarColor(0x80000000); // .5 transparent
window.setStatusBarColor(0xff2ac3e8); // custom
} });
@}
It works on my galaxy s4 with lollipop (API21). Btw. You can try this on Marshmallow. It doesnt work on KitKat because setStatusBarColor requires API21
I am new to fuse. Do I put this in a custom NativeModule?
Bent
March 15, 2016, 10:03pm
7