Dark icons on status bar

This is the place to ask "How do I ...?"
Post Reply
Tored
Posts: 2
Joined: Mon Feb 11, 2019 11:28 am

Dark icons on status bar

Post by Tored » Mon Feb 11, 2019 11:32 am

can I somehow change the status bar icons to dark on a desktop? doesn't seem to be an option in the "system bars" subcategory.

User avatar
Pierrot
Site Admin
Posts: 181
Joined: Wed Jan 23, 2019 12:18 pm
Location: French Alps

Re: Dark icons on status bar

Post by Pierrot » Mon Feb 11, 2019 1:53 pm

No, you need root for that. This is managed by the Android system UI, outside of the launcher scope.

Tored
Posts: 2
Joined: Mon Feb 11, 2019 11:28 am

Re: Dark icons on status bar

Post by Tored » Mon Feb 11, 2019 1:59 pm

Pierrot wrote:
Mon Feb 11, 2019 1:53 pm
No, you need root for that. This is managed by the Android system UI, outside of the launcher scope.
I've seen other launchers like lawnchair do it, are you sure it's not possible?

User avatar
TrianguloY
Posts: 92
Joined: Thu Jan 24, 2019 9:46 am

Re: Dark icons on status bar

Post by TrianguloY » Mon Feb 11, 2019 1:59 pm

It seems there is a way to tell android to draw dark icons, either from a theme attribute or programmatically, with this script:

Code: Select all

bindClass("android.view.View");
getHomeScreen().getContext().getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
However it doesn't work for me, and it seems it doesn't work on a lot of devices, but...you can try.

[Note: this only works on android M and above]

User avatar
Pierrot
Site Admin
Posts: 181
Joined: Wed Jan 23, 2019 12:18 pm
Location: French Alps

Re: Dark icons on status bar

Post by Pierrot » Mon Feb 11, 2019 2:18 pm

Interesting! I wasn't aware of this possibility!

User avatar
JayM
Posts: 62
Joined: Tue Jan 29, 2019 11:57 pm

Re: Dark icons on status bar

Post by JayM » Tue Feb 12, 2019 5:35 pm

cool, works for me 😁

User avatar
JayM
Posts: 62
Joined: Tue Jan 29, 2019 11:57 pm

Re: Dark icons on status bar

Post by JayM » Mon Mar 18, 2019 4:59 pm

Ok this works but soon as I open an app then go back to the launcher homescreen the icons are light again. If I press the home button they turn dark I tried setting the script in resume/load/paused but it didn't make a difference.

User avatar
TrianguloY
Posts: 92
Joined: Thu Jan 24, 2019 9:46 am

Re: Dark icons on status bar

Post by TrianguloY » Mon Mar 18, 2019 5:57 pm

As I said I can't test it, but perhaps the issue is that the script needs to be run after some other code.
What if you write it inside a setTimeout?

setTimeout(function(){
bind...
get...
},0);//or try with 1, 50, 100...

User avatar
JayM
Posts: 62
Joined: Tue Jan 29, 2019 11:57 pm

Re: Dark icons on status bar

Post by JayM » Tue Mar 19, 2019 1:47 pm

TrianguloY wrote:
Mon Mar 18, 2019 5:57 pm
As I said I can't test it, but perhaps the issue is that the script needs to be run after some other code.
What if you write it inside a setTimeout?

setTimeout(function(){
bind...
get...
},0);//or try with 1, 50, 100...
Works great with a timeout of 100 thanks

User avatar
Pierrot
Site Admin
Posts: 181
Joined: Wed Jan 23, 2019 12:18 pm
Location: French Alps

Re: Dark icons on status bar

Post by Pierrot » Fri Mar 22, 2019 8:36 am

I have added these options to the next beta, thanks for the hint!

User avatar
JayM
Posts: 62
Joined: Tue Jan 29, 2019 11:57 pm

Re: Dark icons on status bar

Post by JayM » Sun Mar 24, 2019 11:49 am

nice! thanks

Post Reply