# Android StatusBar won't change color

**URL:** <https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676>\
**Category:** Bug Reports\
**Created:** [March 10, 2016, 9:20pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676 "2016-03-10T21:20:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyril.gantzer](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@cyril.gantzer](https://forums.fusetools.com/u/cyril.gantzer)\
**Post date:** [March 10, 2016, 9:20pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/1 "2016-03-10T21:20:39Z")

</div>

As per [https://www.fusetools.com/learn/fuse/ux/fuse/android/statusbarconfig](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).

---

<div class="post-metadata">

**Author:** ![skezo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/skezo/32/34_2.png) [@skezo](https://forums.fusetools.com/u/skezo)\
**Post date:** [March 11, 2016, 8:32am UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/2 "2016-03-11T08:32:07Z")

</div>

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/howto_discussions/android_statusbarbackground_and_status_bar_being_o)

[https://www.fusetools.com/community/forums/general/android\_lollipop\_511\_motog3\_i\_cannot\_change\_color](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.

---

<div class="post-metadata">

**Author:** ![Lukasz\_Zemczak](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@Lukasz\_Zemczak](https://forums.fusetools.com/u/Lukasz_Zemczak)\
**Post date:** [March 11, 2016, 10:53am UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/3 "2016-03-11T10:53:43Z")

</div>

I have the same problem. The IsVisible works but always black status bar. Tested on my s4 with lollipop.

Me too Skezo

---

<div class="post-metadata">

**Author:** ![Lukasz\_Zemczak](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@Lukasz\_Zemczak](https://forums.fusetools.com/u/Lukasz_Zemczak)\
**Post date:** [March 15, 2016, 5:26pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/4 "2016-03-15T17:26:56Z")

</div>

Ok guys, if you want to change statusbar color you can use this:

```auto
[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 😉

---

<div class="post-metadata">

**Author:** ![Bent](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bent/32/157_2.png) [@Bent](https://forums.fusetools.com/u/Bent)\
**Post date:** [March 15, 2016, 9:43pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/5 "2016-03-15T21:43:39Z")

</div>

Top stuff Łukasz 🙂

---

<div class="post-metadata">

**Author:** ![Donald1](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@Donald1](https://forums.fusetools.com/u/Donald1)\
**Post date:** [March 15, 2016, 10:01pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/6 "2016-03-15T22:01:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bent](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bent/32/157_2.png) [@Bent](https://forums.fusetools.com/u/Bent)\
**Post date:** [March 15, 2016, 10:03pm UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/7 "2016-03-15T22:03:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![skezo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/skezo/32/34_2.png) [@skezo](https://forums.fusetools.com/u/skezo)\
**Post date:** [March 17, 2016, 8:32am UTC](https://forums.fusetools.com/t/android-statusbar-wont-change-color/3676/8 "2016-03-17T08:32:40Z")

</div>

Fantastic! Thanks Łukasz
