Skip to content
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

Status bar elements have light theme color when the app launches with theme set to automatic and system wide dark mode is enabled #17

Closed
LuminarySage opened this issue Feb 28, 2020 · 10 comments

Comments

@LuminarySage
Copy link

LuminarySage commented Feb 28, 2020

Notice the third time I launch the app with app theme set to automatic, status bar elements are black on dark gray background.

ezgif com-video-to-gif

@enricocid
Copy link
Owner

Weird, Android 10?

Hope to receive it asap on my mi A2 Lite so I can have a look into this issue (emulator not working anymore on my PC ...). Thanks for reporting 👌😃

@LuminarySage
Copy link
Author

Yeah it's Android 10 on Pixel 4 XL. Does your app's dark theme not follow battery saver setting on Android 9 and below?

@enricocid
Copy link
Owner

enricocid commented Feb 28, 2020

Yeah it's Android 10 on Pixel 4 XL. Does your app's dark theme not follow battery saver setting on Android 9 and below?

It is following battery saver on <= Android 9, like suggested by Google docs:

else -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM else AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY

For some reasons not depending by me it is not working on some MIUI and Xiaomi devices.
Don't know much about other manufacturers.

@LuminarySage
Copy link
Author

Yeah Xiaomi is known for breaking a lot of standard Android behaviors. Isn't the Mi A2 Lite an Android One phone though so it runs near stock Android right?

@enricocid
Copy link
Owner

Yes, it is pure Android with few MIUI integrations (mi services, mi remote, mi feedback).
I've read on the web that other devs are experiencing this issue on Xiaomi devices. Gonna perform a deeper search about this issue :)

@enricocid
Copy link
Owner

I tried to change the way I'm checking if night mode is enabled. Could You try if this change fixes the issue?

https://drive.google.com/open?id=17ZjAOiFpjg1uCrHeB4KORM1r5e8Tu2vi

@LuminarySage
Copy link
Author

It doesn't. Also, I just notice I some how fooled the home bar to change color too
Screenshot_20200301-110735

@enricocid
Copy link
Owner

Strange, I was able to reproduce and fix this issue on the emulator
Could you try this?

https://drive.google.com/open?id=13ivUWr7_j51dgKHjaczt5qcz62CwKwo-

@enricocid
Copy link
Owner

@LuminarySage
Copy link
Author

Yeah so both of them don't have the bug anymore for me. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants