【发布时间】:2021-07-18 18:52:31
【问题描述】:
我想在反应导航 5 中更改材质顶部选项卡的边框底部颜色和背景颜色
我尝试了下面的代码,但是当我更改 tabStyle 的背景颜色时,indicatorStyle 边框底部颜色不起作用,但是当我删除 tabstyle 时,指示器样式起作用。
<Nav />
<tTab.Navigator
tabBarOptions={{
tabStyle: { backgroundColor: "black" },
indicatorStyle: {
borderBottomColor: "#50d3a7",
borderBottomWidth: 2,
},
}}
initialRouteName="Points"
>
<tTab.Screen name="Points" component={pointleftScreen} />
<tTab.Screen name="Daily Rewards" component={calendarScreen} />
</tTab.Navigator>
我在这里添加了示例 - https://snack.expo.io/@adjmpw/chaneg-borderbottom-and-background
【问题讨论】:
标签: react-native react-native-navigation