react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

topBar background is white before welcome screen loads

Open shakogele opened this issue 7 years ago • 3 comments

Issue Description

topBar background is white before welcome screen loads

Steps to Reproduce / Code Snippets / Screenshots

I'm doing following on app.js where I import all screens I have:

Navigation.setDefaultOptions({
  layout: {
    backgroundColor: '#f8a11b'
  },
  topBar: {
    visible: true,
    animate: false,
    hideOnScroll: false,
    drawBehind: true,
    elevation: 0,
    background: {
      color: '#f8a11b'
    }
  }
});

Thank I have stack in same file App.js:

Navigation.events().registerAppLaunchedListener(() => {
    Navigation.setRoot({
      root: {
        sideMenu: {
          left: {
            component: {
              name: 'myproj.SideDrawer',
              id: 'leftSideMenu',
              passProps: {
                text: 'This is a left side menu screen'
              }
            }
          },
          center: {
            stack:{
              id: 'WelcomeScreen',
              children: [
                {
                  component: {
                    name: 'myproj.WelcomeScreen'
                  }
                }
              ]
            }
          }
        },
      }
    });

});

On my welcome screen I have following: on component I have static method which returns screen options and I am returning following options:

  static options(passProps) {
    return welcomeScreenOptions;
  };
export const welcomeScreenOptions = {
  layout: {
    backgroundColor: '#f8a11b'
  },
  topBar: {
    visible: true,
    animate: false,
    hideOnScroll: true,
    drawBehind: true,
    testID: 'topBar',
    elevation: 0,
    backButton: {
      visible: false,
    },
    title:{
      alignment: "center"
    },
    background: {
      color: '#f8a11b'
    },
  }
}

But anyway when I open the app sometimes(sometimes its the color which I have in options) the headers background is white and than it changes to the color I provide in options)

Environment

  • React Native Navigation version: ^2.1.3-patch.2
  • React Native version: 0.57.8
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): any device

shakogele avatar Jan 24 '19 14:01 shakogele

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.

stale[bot] avatar Feb 23 '19 15:02 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Mar 02 '19 16:03 stale[bot]

I am also experiencing this but with every first screen change.

flikQ avatar Jun 06 '19 09:06 flikQ