-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update Android Status Bar Text / Icon color based on theme/night mode #1442
Comments
Any update on this? |
We generally post updates when there are changes, we are still planning to work on this for the release tagged. |
the PR #2230 fixes the action bar, but for some reason the status bar still has a problem, it will not switch into dark text (light mode)... Looking for anyone who can help on this. |
This can be done programmatically in Kotlin/Java. Can't find anything similar implemented by gomobile. However, until we can do it programmatically, a way to hide this shortcoming is by simply hiding the status bar. This can be done by adding the following android:theme attribute in the activity tag on AndroidManifest.xml
|
Thanks @yebowhatsay - if it can be done in Java then we can call that from our code. Looks like the key in that article is:
However we will need to convert our colours into Android ones. I had hoped we could just tell android "use light theme bar" like on iOS, but this may work instead. Let's not hide the status bar, it is a useful feature of the platform. |
Would have loved to help port this to Fyne, but really don't know where to get started. |
You can see some of our other Android bridge code in the |
Thanks @andydotxyz . I am having a go at cgo and studying the c/java code in the project. |
The same problem. I have changed the background color to fix it. Thanks for reminding.
|
Android Apps can draw below the status and navigation bars, however if the App background is white the elements inside the status and navigation become invisible as they are also white. Android will switch the elements to black if it is aware of the App's background colour, therefore Fyne needs to communicate the current theme's colour scheme to Android.
The text was updated successfully, but these errors were encountered: