Page 1 of 1

Dark icons on status bar

Posted: Mon Feb 11, 2019 11:32 am
by Tored
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.

Re: Dark icons on status bar

Posted: Mon Feb 11, 2019 1:53 pm
by Pierrot
No, you need root for that. This is managed by the Android system UI, outside of the launcher scope.

Re: Dark icons on status bar

Posted: Mon Feb 11, 2019 1:59 pm
by Tored
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?

Re: Dark icons on status bar

Posted: Mon Feb 11, 2019 1:59 pm
by TrianguloY
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]

Re: Dark icons on status bar

Posted: Mon Feb 11, 2019 2:18 pm
by Pierrot
Interesting! I wasn't aware of this possibility!

Re: Dark icons on status bar

Posted: Tue Feb 12, 2019 5:35 pm
by JayM
cool, works for me 😁

Re: Dark icons on status bar

Posted: Mon Mar 18, 2019 4:59 pm
by JayM
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.

Re: Dark icons on status bar

Posted: Mon Mar 18, 2019 5:57 pm
by TrianguloY
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...

Re: Dark icons on status bar

Posted: Tue Mar 19, 2019 1:47 pm
by JayM
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

Re: Dark icons on status bar

Posted: Fri Mar 22, 2019 8:36 am
by Pierrot
I have added these options to the next beta, thanks for the hint!

Re: Dark icons on status bar

Posted: Sun Mar 24, 2019 11:49 am
by JayM
nice! thanks