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
White screen before splash screen #338
Comments
There's a hack for that.
Thanks to #11 (comment) |
i am stii getting the white screen after adding that line |
What I did was to delay hiding the splash screen at the screen your app loads when starting up, like so:
You can experiment with the delay so it fits your app the best. Hope it helps! |
@sergiulucaci |
I believe the reason you’re getting the white flash is because—on iOS as an example—Swift is loading in between the launch image and react native. React Native takes a second to load the splash screen and in between a white flash is seen. This YouTube video was really helpful for me to get rid of it. https://youtu.be/H0CC1UsvjDQ |
@BenjErgizerBunny |
I'm facing the same issue @sergiulucaci's solution makes the app to start after some delay. https://www.youtube.com/watch?v=rnLR65OGtic i try this solution i can't apply my splash design because he is using layer-list instead of layout. Any other solution? |
Hi, i think below given link can help you. |
Also had this issue. Changing splash screen background color to the one which I use on the next screen saved the situation for both platforms |
Fixed my issue. |
Works for me, THANK YOU!!! |
hey, same problem here did u find any other solution |
what worked for me : `
` |
I have encountered a case after hiding the splash screen the screen is white, has anyone encountered this situation like me |
is there any solution of React Native iOS build? i experienced white screen before splash screen for both platform. |
For me (using react-native-navigation and persistant redux) the only working solution is: It gives some time to react-native-navigation to mount the next screen after splash. |
This works for me! |
Solved my problem... |
I am still getting the white blank screen before the splash screen. I have created my own splash screen though which loads important network calls such as authentication. After react-native bundle the application a white screen pops up for 1-2 seconds and then splash screen followed by main activity. I have tried almost every solution mentioned above but nothing is working. Did anyone face a similar issue after creating a custom Splash screen and solved it? |
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowDisablePreview">true</item> // <--- ADD THIS
// Other items...
</style>
</resources> using this solved the problem but app is not open on click it take a second to show spalshscreen. using this solution is making app splash screen worse users will think that the app is slow. |
Another possible solution is to set the background of the screen instead of turning off the preview. This prevents any delay between clicking the app icon and launching the splash screen. <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@drawable/splash_screen</item>
</style>
</resources>
|
Actually you don't need to depend on the library, you just need a simple setup. drawable/launch_screen.xml <?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#fff" />
</shape>
</item>
<item android:drawable="@drawable/home" android:gravity="center" android:top="-64dp" />
</layer-list> drawable/home.xml <vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="126dp"
android:height="133dp"
android:viewportWidth="126"
android:viewportHeight="133"
>
<path android:pathData="M31.5,56.7H12.6V100.8H31.5V56.7Z" android:fillColor="#323232" />
<path android:pathData="M72.45,56.7H53.55V100.8H72.45V56.7Z" android:fillColor="#323232" />
<path android:pathData="M126,113.4H0V132.3H126V113.4Z" android:fillColor="#323232" />
<path android:pathData="M113.4,56.7H94.5V100.8H113.4V56.7Z" android:fillColor="#323232" />
<path android:pathData="M63,0L0,31.5V44.1H126V31.5L63,0Z" android:fillColor="#323232" />
</vector> values/styles.xml <resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:statusBarColor">#fff</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowBackground">@drawable/launch_screen</item>
</style>
</resources> |
this solution worked for me. but I was try put this code in through VS code. and it was not reflected in android studio. when this solution is put via android studio. it worked for me. |
it worked for me but when my app is running and i opened the textinput then starting vector appers behind keyboard |
After several tries of installing this component I still get the white background from my main activity before the splash screen is shown.
My installation steps are:
But still I get the white background from my main activity. I could set the default color of the main activity, but this is not preferable.
Anyone has the this problem and solved it?
The text was updated successfully, but these errors were encountered: