首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >react本机页脚图标

react本机页脚图标
EN

Stack Overflow用户
提问于 2018-02-05 06:00:10
回答 1查看 1.2K关注 0票数 0

我喜欢和安卓的IOS一样的风格。你可以在IOS中看到中间的图标很不错,但在android中就不好了

我使用的代码是这样的

代码语言:javascript
复制
  <Footer style={{ backgroundColor: "#FFFFFF" }}>
    <FooterTab style={{ backgroundColor: "#FFFFFF" }}>
      <Button onPress={() => { Actions.Startpage();}}>
        <Icon name="search" size={30} color="#3ba936" />
      <Text style={styles.smalltext} numberOfLines={1}>Ontdekken</Text>
      </Button>
      <Button onPress={() => { Actions.ThemasPage();}}>
        <Icon name="id-card" size={30} color="#3ba936" />
      <Text style={styles.smalltext} numberOfLines={1}>Thema's</Text>
      </Button>
      <Button  style={{marginBottom:20, borderRadius:50, height: 90, backgroundColor: '#FFFFFF', overflow: 'visible'}} onPress={() => { Actions.EventPage();}}>
        <Icon name="calendar-plus-o" size={50} color="#3ba936" />
      <Text style={styles.smalltext} numberOfLines={1}>Evenementen</Text>
      </Button>
      <Button onPress={() => { Actions.Wildpage();}}>
        <Icon name="binoculars" size={30} color="#e50040" />
      <Text style={styles.smalltext} numberOfLines={1}>100% Wild</Text>
      </Button>
      <Button onPress={() => { Actions.MenuPage();}}>
        <Icon name="bars" size={30} color="#3ba936" />
      <Text style={styles.smalltext} numberOfLines={1}>Menu</Text>
      </Button>
    </FooterTab>
  </Footer>
EN

回答 1

Stack Overflow用户

发布于 2018-02-05 06:10:30

这是因为按钮比容器大。

在iOS中,它将是可见的,但在android上,容器会裁剪任何溢出的内部元素。

您可以做的是更改页脚上的高度,使其等于中间的按钮,并确保其他按钮的高度较小,以提供相同的效果,而不会溢出到父组件之外。

对于灰色线条,您可以添加高度为1且全宽的视图

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

https://stackoverflow.com/questions/48613415

复制
相关文章

相似问题

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