TabNavigator涵盖内容

Vla*_*ila 6 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>
Run Code Online (Sandbox Code Playgroud)

小智 0

您可以在 中将该特定屏幕设置的 选项卡导航器隐藏tabBarVisible为 false navigationOptions。但我认为问题是因为标题,您可以尝试使用反应导航标题栏paddingBottom否则,您可以添加到与标题高度相同的容器 a