-
Notifications
You must be signed in to change notification settings - Fork 222
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
Black screen that shows up between the splash screen and my app's first screen #54
Comments
same here, in android and ios |
I don't know for iOS but for Android, delete <!--android/app/src/main/res/values/styles.xml-->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
<!-- delete this line. <item name="android:windowFullscreen">true</item>-->
</style>
</resources> |
Probably you are using V2 of Flutter's Android embedding in MainActivity. You need to update the <meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"/> and remove old <meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true"/> You need to update <?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<!--
<item name="android:windowFullscreen">true</item> -->
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources> For me, the problem was shown in another way. I can't select a text field on the bottom of the page, because the keyboard hide the field. Different problems but the same answer. |
Thank you very much @edufolly |
Hello, I have searched but I do not have those lines in my AndroidManifest.xml files (debug, profile, main). I just have this metadata line: |
@camillo777 I also did not have the "old meta-data", but it still worked for me. Did you try adding the meta data inside |
Any update on this? Really hoping to get an update from dev on this. Solution from @yunseo-h68 and @edufolly works but the splash screen jerks. |
What worked for me to prevent the jumping was to add the following to the
I did not have to change the
|
It work for me :) !!!!. One last thing, during launching process, the status bar passe from black, to grey, to black again... |
Looked into this and it is because the style's parent is |
Thanks, your solution give me possibility to remove the first status bar color. I would removing the second one to have a full Black status bar :) ! |
From what I understand is that is in flutter but it uses the system color / device specific. If I use Blue as the primary color in flutter then a slightly darker blue appears there. On a different device it may appear as black. |
@lance-auror That worked flawlessly! Thank you so much. Great work! Note: I didn't experience the 'status bar color change' issue that @EArminjon is experiencing. |
I have the same issue on ios |
same issue on iOS also |
Just a note that for me, when making the change to translucent both on a real device and on a Pixel 2 API R Emulator, this seems to cause a lag after pressing the launch icon. The launch icon visibly changes to show its recognised the gesture input but then nothing would happen for about 1-2 seconds and then the splash screen loads. |
@edufolly with regards to your statement
Did you find any solution because even despite using SingleChildScrollView which is meant to bring a textfield into view and away from the keyboard, this package still causes this issue |
In my case (on Android only, on IOS is ok), the png image I use as a home screen shows the pubspec.yaml defined colors first, but before It finish loading the png is still visible but the background turns black ... any solution? it's really ugly and I can't find any solution ... Thanks, I hope it gets fixed because I love the simplicity of this package |
Had the same issue with the Translucent theme, but that delay caused the splash screen to not show up at all when running on release mode, while on debug mode worked just fine. Reverting to the Black theme fixed the issue. |
Should be resolved by 4898182. |
The solution for me was to change the background color. #000000 to #080808 and it worked |
Config used:
Tested with Android Device
dev_dependencies:
flutter_native_splash: ^0.1.9
flutter_native_splash:
image: assets/icon/...-splash.png
color: "#ffffff"
The text was updated successfully, but these errors were encountered: