由于某种原因,我的主动色无法正常工作。相反,它的默认白色/黑色处于活动状态或非活动状态。另外,我想以某种方式将背景barstyle颜色设置为透明。你有什么想法吗?
export default createMaterialBottomTabNavigator(
{
Home: HomeStack,
Settings: SettingsStack,
Menu:Doctors,
super:Page1,
props:Page2
},
{
navigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused, tintColor }) => {
const { routeName } = navigation.state;
let iconName;
if (routeName === 'Home') {
iconName = 'home'
} else if (routeName === 'Settings') {
iconName = 'settings'
} else if (routeName === 'Menu'){
iconName = 'description'
}else if (routeName === 'super'){
iconName = 'menu'
}else if (routeName === 'props'){
iconName = 'notifications'
}
return <Icon name={iconName} size={23} color={tintColor} />;
},
}),
tabBarPosition: 'bottom',
tabBarOptions: {
activeTintColor: 'tomato',
inactiveTintColor: 'gray',
},
animationEnabled: true,
swipeEnabled: false,
shifting :true
}
);