Android StatusBar won't change color

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).

I believe this is being worked on, check out: https://www.fusetools.com/community/forums/howto_discussions/android_statusbarbackground_and_status_bar_being_o

https://www.fusetools.com/community/forums/general/android_lollipop_511_motog3_i_cannot_change_color

I would love for this to be resolved as well.

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 :wink:

Top stuff Łukasz :slight_smile:

I am new to fuse. Do I put this in a custom NativeModule?

@Donald: see this video tutorial to get an overview: https://www.youtube.com/watch?v=5AoCdAKPLn4&index=24&list=PLdlqWm6b-XALJgM3fGa4q95Yipsgb8Q1o

Fantastic! Thanks Łukasz