-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color status bar according to hass theme #26
Comments
I have that problem too |
So an initial implementation could look at the HTML source and extract the theme from the document.querySelector('meta[name=theme-color]').content This would be a good first approach. This won't work when a user changes the theme though. If we want to add support for that, we should first update the frontend first to notify the app via the external bus https://developers.home-assistant.io/docs/en/frontend_external_bus.html |
Opened an issue at the frontend to track reporting the primary color via the external bus. home-assistant/frontend#4220 |
When implemented in the app, we should cache the primary color value, and update it whenever the frontend gives us a new value. |
One quick fix here is to use |
It's not perfect but probably hits 90% use cases. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just tested build 80 and I force closed the app and reopened and it did not update the status bar. I tried to clear data in the app and log back in, change the theme and then force close the app but it still did not update. Is there a specific theme variable that needs to be set that I am missing? |
I noticed when I got to my production instance too, already fixed: #270 |
@JBassett latest build (81) does not seem to be working when I force close the app and re-open, are you seeing the same thing? |
@dshokouhi Yep, the device I test with (Nexus 6) it works great.... but it's a couple versions behind, My Pixel 2 doesn't work. I normally don't test on it because I would need to uninstall the firebase version. I'm going to do 2 things, make it so a debug build can be installed beside a "production" build and fix the themeing on newer devices. |
Hi, is there some progress on this? |
After digging in we are doing what we can for now, another story has been opened to set theme of current app instead of overall theme: #272 However if you call the |
Android Status Bar color is defaulting to the colorPrimaryDark of the app theme. Looks like this is "hassio blue" which makes it ugly (see image).
The text was updated successfully, but these errors were encountered: