React-native-splash-screen: [Android] React native 0.37. First shows white splash screen and after 1 sec shows my splash screen.

Created on 25 Nov 2016  路  3Comments  路  Source: crazycodeboy/react-native-splash-screen

Android.
React native 0.37.

First shows white (default) splash screen and after 1 sec shows my splash screen.
Is it normal behaviour? How can I fix it?

Most helpful comment

Everything is like in your comment above, but I still see the white bg and after that my splash screen shows.

Actually I found a fix for it:
http://stackoverflow.com/a/34960302/4541800

You could include it in the readme.

Thanks!

All 3 comments

In your MainActivity.java, SplashScreen.show(this); must in the above super.onCreate(savedInstanceState);.

public class MainActivity extends ReactActivity {
   @Override
    protected void onCreate(Bundle savedInstanceState) {
        SplashScreen.show(this);  // here
        super.onCreate(savedInstanceState);
    }
    // ...other code
}

Everything is like in your comment above, but I still see the white bg and after that my splash screen shows.

Actually I found a fix for it:
http://stackoverflow.com/a/34960302/4541800

You could include it in the readme.

Thanks!

@grundmanise , was pulling my hair looking into the native code. thanks for the link. solved the white screen issue. This should be in readme.

Was this page helpful?
0 / 5 - 0 ratings