-
Notifications
You must be signed in to change notification settings - Fork 218
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
The plugin changes the color from the background to the Splash #184
Comments
@Yeikel200 can you post the contents of your |
I'm closing this due to lack of information. Feel free to reopen it if you're still having trouble. |
I am having the same behavior.
when changing my phone to light mode the background is always white I want the same thing when using dark mode. is there a way to do it? This is my configuration
and this is a video of the problem splash_screen_bug.mp4 |
@ahmedalrifai can you post the contents of your android/app/scr/main/AndroidManifest.xml and android/app/scr/main/res/values/styles.xml files? |
It worked for me by deleting the drawable-v21 folder in the res directory. |
AndroidManifest.xml
android/app/scr/main/res/values/styles.xml
|
i will try it |
When i deleted this folder i got errors when building the app |
I forgot this the package also generate this file values-night/styles.xml
|
I am getting the same issue hen running the device in Dark mode BUT on the foreground PNG image. In all the drawable folders it appears white but upon build it is first white then changes to black. |
@ahmedalrifai is this problem happening in dark mode? |
@benjaminhorner can you post a video of the splash screen? |
Screenrecorder-2021-08-03-16-59-57-875.0.mp4@jonbhanson : here goes |
@ahmedalrifai @benjaminhorner I have not been able to replicate this problem. Can you send me a stripped out version of your app (or not stripped out if you want) that I can test? |
@jonbhanson I believe it's because in Android dark mode it forces dark colors in the splash screen. When I gave it a nice dark color it came out as normal in the splash screen, but when it sees a white color in dark mode it ignores it and uses black. |
@ahmedalrifai I set |
@jonbhanson : https://we.tl/t-eRj4R71aNr Tested with a Xiaomi Mi 10 running MIUI Global 12.1.1 and Android 11 RKQ1.200826.002. Just in case ;-) |
@benjaminhorner I ran your project on both a Pixel 2XL with Android 11 and an emulated Pixel 4 with Android 11, and I was not able to reproduce the changing color on either of these devices. |
@jonbhanson : I get this issue on a real device (Xiaomi Mi 10 Lite). |
That's probably because Xiaomi changes white backgrounds to black when on Dark mode. You can change this behavior under |
@db-dblank it IS caused by this, however, I still regard this as an issue as one cannot expect the users to do this in order to "fix" this. |
Haven't test it yet but it seems that we can disable it by adding |
@db-dblank this does the trick ! |
@benjaminhorner can you post your updated styles.xml? What folder(s) was the styles.xml in? |
@jonbhanson: here is the path to the file The same file also exists for the "default" style in /app/android/src/main/res/values/styles.xml And here is my styles.xml file content: (I only edited the first file)
|
Thanks @benjaminhorner, that helps because I don't have a Xiaomi device to test on. I will add this in the next version to improve Xiaomi support. |
@jonbhanson Hey bro , have you rolled out a fix for this ? because it's still reproduceable for me on Xiaomi redmi 9t till this day , on dark mode white turns grey although I have this everywhere :
Im using flutter_native_splash 2.0.4 btw. |
Sorry, @mohamoha6200 I don't have an Xiaomi device, so there is no way for me to debug this problem. If you still have this problem, please open a new ticket and maybe someone else with an Xiaomi device can help debug. |
Please try under release mode. |
@jinaiyuanbaojie : ofc I've tried it on release mode , I can even show you the production version containing this issue. |
|
@jinaiyuanbaojie @mohamoha6200 does this solution work for you?
|
Yep.From now on everything goes well from my side. Thanks for your amazing pact. You know Xiaomi Huawei are not the pure Android system. They always add some custom codes. So never mind. It must be problems from their own system. |
Good to hear that it works. I will reopen this ticket to see if I can add a fix for this. |
This is making me desperate x( nothing works , @jinaiyuanbaojie I'm wondering what exactly that you've changed for it to work , as long as my xiaomi 9t is on darkmode white appears as grey.
|
Sorry man. I don't have a Xiaomi device. But I believe what you posted. Maybe you can raise a ticket on Xiaomi official website. |
Since the |
I have already add android:forceDarkAllowed ---> false in night/styles.xml but not working in my app on Redmi note 11 and POCO m2 device |
The plugin changes the color from the background to the Splash, that color is not defined anywhere in the configuration
When opening the app, it comes out normal, after a few milliseconds it changes to an undefined color, everything happens after the native screen and before the flutter screen.
Uninstall the app and continue with the same behavior.
file.mp4
Device (please complete the following information):
Flutter doctor
The text was updated successfully, but these errors were encountered: