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中react导航选项卡的底部栏容器颜色_React Native_React Navigation_React Navigation Bottom Tab - Fatal编程技术网

React native 更改react native中react导航选项卡的底部栏容器颜色

React native 更改react native中react导航选项卡的底部栏容器颜色,react-native,react-navigation,react-navigation-bottom-tab,React Native,React Navigation,React Navigation Bottom Tab,我试图添加边界半径的底部酒吧,但与此 我想将容器颜色从默认更改为紫色 我该怎么做 我到目前为止所做的事情 我想要什么 代码: tabBarOptions: { activeTintColor: colors.primary, inactiveTintColor: colors.black, showLabel: false, style: { borderWidth: 0.5, borderBottomWidth

我试图添加边界半径的底部酒吧,但与此 我想将容器颜色从默认更改为紫色

我该怎么做

我到目前为止所做的事情

我想要什么

代码:

tabBarOptions: {
      activeTintColor: colors.primary,
      inactiveTintColor: colors.black,
      showLabel: false,
      style: {
        borderWidth: 0.5,
        borderBottomWidth: 1,
        backgroundColor: 'white',
        borderTopLeftRadius: 20,
        borderTopRightRadius: 20,
        borderColor: colors.lightGrayText,
      },
    },
有人能帮忙吗


谢谢

您必须添加一个绝对位置,使选项卡栏保持在边框内

tabBarOptions={{
          activeTintColor: 'red',
          inactiveTintColor: 'black',
          showLabel: false,
          style: {
            borderWidth: 0.5,
            borderBottomWidth: 1,
            backgroundColor: 'red',
            borderTopLeftRadius: 20,
            borderTopRightRadius: 20,
            borderColor: 'grey',
            position: 'absolute'
          },
        }}>
参考文献