React-native-splash-screen: still have about 0.5s delay in adnroid

Created on 21 Jun 2017  ·  4Comments  ·  Source: crazycodeboy/react-native-splash-screen

This worked ,thanks ,But still have about 0.5s delay in adnroid . Did anyone else meet this problem?

Most helpful comment

@crazycodeboy How does setting translucency solve this? Not complaining, just curious.

All 4 comments

Optional steps:

If you want the splash screen to be transparent, follow these steps.

Open android/app/src/main/res/values/styles.xml and add <item name="android:windowIsTranslucent">true</item> to the file. It should look like this:

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <!--设置透明背景-->
        <item name="android:windowIsTranslucent">true</item>
    </style>
</resources>

@crazycodeboy Thanks very much,this solves the problem

@crazycodeboy How does setting translucency solve this? Not complaining, just curious.

@crazycodeboy How does setting translucency solve this? Not complaining, just curious.

I think it's actually like a trick as transparent window would let users see the previous screen before launch.

Before setting android:windowIsTranslucent, the sequence is like these.
0s: launch app from screen A (most likely app launcher or home screen)
0 - 0.5s: white screen 😞
0.5s: splash screen shows to user

After setting it, the sequence would be like these.
0s: users trigger the app on screen A
0 - 0.5s: users still see screen A as the window is transparent now 🤔
0.5: show splash screen to users 🎉

Was this page helpful?
0 / 5 - 0 ratings