Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 反应本机页脚图标_React Native_Styles - Fatal编程技术网

React native 反应本机页脚图标

React native 反应本机页脚图标,react-native,styles,React Native,Styles,我喜欢安卓系统中IOS的风格。你可以看到iOS中的图标是很好的,但是在Android中它不是 我使用的代码就是这个 <Footer style={{ backgroundColor: "#FFFFFF" }}> <FooterTab style={{ backgroundColor: "#FFFFFF" }}> <Button onPress={() => { Actions.Startpage();}}> &

我喜欢安卓系统中IOS的风格。你可以看到iOS中的图标是很好的,但是在Android中它不是

我使用的代码就是这个

  <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>

{Actions.Startpage();}}>
昂德肯
{Actions.ThemasPage();}}>
西玛的
{Actions.EventPage();}}>
晚上
{Actions.Wildpage();}}>
100%野生
{Actions.MenuPage();}}>
菜单

这是因为按钮比容器大

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

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


对于灰线,您可以添加高度为1且全宽的视图,这是因为按钮比容器大

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

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


对于灰线,您可以添加高度为1且全宽的视图,页脚仅为自定义的
,您可以添加
高度:100
,例如在页脚组件样式中,页脚仅为自定义的
,您可以添加
高度:100
,例如在页脚组件样式中