相关疑难解决方法(0)

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

我正在尝试将边框半径添加到底部栏,但是我想将容器颜色从默认更改为紫色。

我怎样才能做到这一点 ?

到目前为止我做了什么

在此处输入图片说明

我想要的是

在此处输入图片说明

代码:

tabBarOptions: {
      activeTintColor: colors.primary,
      inactiveTintColor: colors.black,
      showLabel: false,
      style: {
        borderWidth: 0.5,
        borderBottomWidth: 1,
        backgroundColor: 'white',
        borderTopLeftRadius: 20,
        borderTopRightRadius: 20,
        borderColor: colors.lightGrayText,
      },
    },
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮忙吗?

谢谢

react-native react-navigation react-navigation-bottom-tab

2
推荐指数
1
解决办法
1275
查看次数