gpt4 book ai didi

react-native - 无法更改标签栏背景颜色

转载 作者:行者123 更新时间:2023-12-03 15:49:40 24 4
gpt4 key购买 nike

我在我的项目中使用 BottomTabNavigator 虽然我试图更改样式背景颜色,但我无法更改默认颜色的选项卡的颜色。以下是我正在使用的代码,即使色调也没有改变。我附上了页面的截图。
我想更改图标所在栏的颜色。 enter image description here .

{
tabBarPosition: 'bottom',
tabBarOptions: {
activeTintColor: 'blue',
inactiveTintColor: 'grey',
style: {
backgroundColor: 'darkcerulean',
},
labelStyle: {
fontSize: 13,
},

}
}
有人可以帮我吗?
提前致谢。

最佳答案

使用它的例子:

 export default createBottomTabNavigator({
home: {
screen: HomeScreen,
navigationOptions: ({ navigation }) => ({
title: 'Home'
})
},
},
{
initialRouteName: "home",
tabBarOptions: {
style: {
height: 55,
backgroundColor: '#8e7e7e'
}
}
});

关于react-native - 无法更改标签栏背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51764929/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com