mehcode / rn-splash-screen

A JavaScript-controlled splash-screen for React Native designed to be run directly after the native splash-screen.
MIT License
350 stars 95 forks source link

"Pink face" show up between my splash screen and the initial app page. #12

Closed yberstad closed 8 years ago

yberstad commented 8 years ago

Hi!

First I have to thank you for creating this splash screen component!

I have followed you steps for adding this to my project, but the "pink face" from your example is displayed between my splash screen and the initial page of my app. My workaround was to add in my project styles.xml:

    <style name="RNSplashScreen_SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowBackground">@drawable/appicon</item>
        <item name="android:windowAnimationStyle">@style/RNSplashScreen_SplashAnimation</item>
    </style>

I did this to override the in "@drawable/splash" from the rn-splash-screen, with my splash screen image.

Is there a better way, or have I misconfigured something?

Looking forward for the iOS example 😃

mehcode commented 8 years ago

The docs instruct you to name your splash screen splash because this package's theme makes use of that drawable key as well. Android will merge resources and prioritize the applications over libraries (meaning your splash drawable will overwrite the default one in this project).

https://github.com/mehcode/rn-splash-screen/blob/master/docs/android.md#configure

yberstad commented 8 years ago

Sorry for not catching that I needed to call my drawable "splash"! Thank you for pointing that out to me :)