TabNavigator涵盖了内容

时间:2018-09-21 15:36:54

标签: reactjs react-native react-redux react-navigation

我有这个组件,其中包含一个列表,该列表的底部由TabNavigator覆盖。任何想法如何解决?仅有样式吗?

render() {
    return (
        <Container style={{ paddingBottom: 5 }}>
          <Header
            backgroundColor={'#1E6EC7'}
            placement="left"
            leftComponent={{ icon: 'menu', color: '#fff' }}
            centerComponent={{ text: 'Programul Zilei', style: { color: '#fff', fontWeight: 'bold', fontSize: 22 } }}
            rightComponent={<Icon name="ios-add" style={{ color: 'white' }} onPress={() => {
               const {students}=this.props;
               this.props.navigation.navigate('AddClass', {students})}} />}
          />
          <List>
            <FlatList
              data={this.props.classes}
              keyExtractor={(item, index) => `${index}`}
              extraData={this.state}
              renderItem={({ item }) => {
                  <ListItem
                    leftIcon={<View style={{ flexDirection: 'row' }}><Icon1 name="times" size={24} style={{ paddingRight: 10, color: 'red' }} onPress={() => {
                      this.setState({ currentStudent: wantedEmployee })
                      this.setState({ currentClass: item })
                      this.props.classDeleteModalShowUp();
                      }} />                   
                  }
            />
          </List>
        </Container>

1 个答案:

答案 0 :(得分:0)

您可以hide the tab navigator进行特定的屏幕设置 tabBarVisiblenavigationOptions为假。 但是我认为问题是由于标题引起的,您可以尝试使用react navigation header bar。 否则,您可以将与标头高度相同的paddingBottom添加到容器中

相关问题