React-native-navigation: How to disable addDefaultSplashLayout in NavigationActivity on android ?

Created on 9 Mar 2019  路  4Comments  路  Source: wix/react-native-navigation

When app starts its shows white screen between splash screen and first navigation route.

I've been researched it and came to it that this is because of addDefaultSplashLayout in the NavigationActivity fired from onCreate.
when i delete this call, the native splash is hanging and the first navigation route never appears.

i want to show the first navigation route immediately when app starts or immediately after native splash screen.


Environment

  • React Native Navigation version: 2.13.1
  • React Native version: 0.58.6
  • Platform(s) (iOS, Android, or both?): Android
馃彋 stale

Most helpful comment

Hi @RoiDayan1 ,

I had the same issue and I _think_ I solved it by adding this in my MainActivity.java:

@Override
    protected void addDefaultSplashLayout() {
        View view = new View(this);
        view.setBackgroundColor(Color.parseColor("#1C299F"));
        setContentView(view);
    }

Where #1C299F is the background color you would the to use instead of white.

Hope it helps!

EDIT: Sorry, not really the ideal solution, since you (and I) would like to remove it completely. Maybe my solution could be better than nothing though?

All 4 comments

Hi @RoiDayan1 ,

I had the same issue and I _think_ I solved it by adding this in my MainActivity.java:

@Override
    protected void addDefaultSplashLayout() {
        View view = new View(this);
        view.setBackgroundColor(Color.parseColor("#1C299F"));
        setContentView(view);
    }

Where #1C299F is the background color you would the to use instead of white.

Hope it helps!

EDIT: Sorry, not really the ideal solution, since you (and I) would like to remove it completely. Maybe my solution could be better than nothing though?

this exactly what I did.. thank you.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

The issue has been closed for inactivity.

Was this page helpful?
0 / 5 - 0 ratings