RN. Флюс маршрутизатора с выдвижным ящиком и панелью вкладок. Мне нужно сделать sh новую сцену из кнопки панели вкладок - PullRequest
0 голосов
/ 15 марта 2020

Здравствуйте, у меня есть ящик с вкладками. На панели вкладок у меня есть кнопка. При нажатии кнопки хочу сделать пу sh камеру на экране сцены. Вот настройки

 <SafeAreaView style={styles.content}>
      <ConnectedRouter
        onStateChange={this.routerStateChange}
        titleStyle={{ color: 'white' }}
        headerTintColor="#FFF"
        backAndroidHandler={this.onBackPress}
        showNavigationBar={false}
      >
        <Stack key="root" hideNavBar hideTabBar>
          <Drawer
            key="drawer"
            contentComponent={CustomDrawer}
            drawerImage={drawerImage}
            drawerBackgroundColor="rgba(0, 0, 0, 0)"
          >
            <Tabs
              key="tabbar"
              tabBarComponent={CustomTabBar}
              swipeEnabled={false}
              lazy={false}
              showIcon
              tabBarPosition="bottom"
              inactiveTintColor="#ffffff"
              activeTintColor="#ffffff"
              tabBarStyle={{ height: 50 }}
              transparent
            >
              <Stack
                key="main"
                title="Photos"
                tabBarLabel="Photos"
                inactiveBackgroundColor="#30393F"
                activeBackgroundColor={colors.blue.dark}
                icon={this.renderPhotoIcon}
                titleStyle={{ color: 'white', alignSelf: 'center' }}
              >
                <Scene
                  key="photos"
                  component={PhotosScreen}
                  title="Home"
                  navBar={CustomNavBar}
                  onEnter={() => {
                    setTimeout(() => {
                      analytics.getInstance().track('Navigation Clicked', 'Photos');
                    }, 1000);
                  }}
                />
              </Stack>
              <Stack
                key="templates"
                title="Templates"
                inactiveBackgroundColor="#30393F"
                activeBackgroundColor={colors.blue.dark}
                icon={this.renderFormIcon}
                titleStyle={{ color: 'white', alignSelf: 'center' }}
              >
                <Scene
                  key="apps"
                  component={TemplateListScreen}
                  title="Templates"
                  navBar={CustomNavBar}
                  onEnter={() => {
                    setTimeout(() => {
                      analytics.getInstance().track('Navigation Clicked', 'Templates');
                    }, 1000);
                  }}
                />
              </Stack>
            </Tabs>
          </Drawer>
          <Scene key="cameraScreen" component={CameraScreen} title="CompanyName" hideNavBar>
</Stack>
          </ConnectedRouter>

Теперь сцена открыта как модальная. Однако я хочу сыграть sh сцену.

...