首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TabNavigator涵盖的内容

TabNavigator涵盖的内容
EN

Stack Overflow用户
提问于 2018-09-21 23:36:54
回答 1查看 1.1K关注 0票数 4

我有一个组件,其中包含一个列表,该列表在底部被TabNavigator覆盖。有什么办法解决这个问题吗?只有一种造型方法吗?

代码语言:javascript
复制
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>
EN

回答 1

Stack Overflow用户

发布于 2018-09-22 13:27:15

您可以在navigationOptions中将该特定屏幕设置的tabBarVisible设置为false。但我认为问题是由于头部的原因,您可以尝试使用react navigation header bar。否则,您可以向容器中添加与标头高度相同的paddingBottom

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52447043

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档