Reactjs react native navigation3我想隐藏底部选项卡导航的一个标签
我想隐藏图片中以黄色突出显示的标签 怎么做 我的代码:Reactjs react native navigation3我想隐藏底部选项卡导航的一个标签,reactjs,react-native,react-navigation,Reactjs,React Native,React Navigation,我想隐藏图片中以黄色突出显示的标签 怎么做 我的代码: const MainBottomTab = createBottomTabNavigator({ HomeStack : { screen : HomeStack, navigationOptions : { showlabel:false, drawerLabel:NullComponent } } , SettingsStack, },{ tabBarPosition:
const MainBottomTab = createBottomTabNavigator({
HomeStack : {
screen : HomeStack,
navigationOptions : {
showlabel:false,
drawerLabel:NullComponent
}
} ,
SettingsStack,
},{
tabBarPosition:"bottom",
navigationOptions:{
},
tabBarOptions:{
activeTintColor: "green",
inactiveTintColor: "#00ccff",
style:{
backgroundColor: "white"
},
indicatorStyle:{
height: 0
},
showIcon:'true'
},
swipeEnabled:true,
});
使用自定义选项卡图标
navigationOptions :({ navigation }) {
tabBarIcon: ({ tintColor }) => {
const { routeName } = navigation.state;
let iconName;
if (routeName === 'Home') iconName = 'home';
else if (routeName === 'Notifications') iconName = 'notifications';
else if (routeName === 'Readout') iconName = 'readout';
else if (routeName === 'Inbox') iconName = 'messages';
else if (routeName === 'Profile') iconName = 'profile';
//Tabicon is just custom Icon display widget . handle All tabicon in TabIcon by iconname
return <TabIcons iconName={iconName} tintColor={tintColor} />;
}
}
navigationOptions:({navigation}){
tabBarIcon:({tintColor})=>{
const{routeName}=navigation.state;
让我来;
if(routeName==='Home')iconName='Home';
else if(routeName=='Notifications')iconName='Notifications';
否则,如果(routeName==='Readout')iconName='Readout';
如果(routeName=='Inbox')图标名='messages',则为else;
如果(routeName==='Profile')iconName='Profile',则为else;
//Tabicon只是一个自定义图标显示小部件。通过图标名处理Tabicon中的所有Tabicon
返回;
}
}
使用自定义选项卡图标
navigationOptions :({ navigation }) {
tabBarIcon: ({ tintColor }) => {
const { routeName } = navigation.state;
let iconName;
if (routeName === 'Home') iconName = 'home';
else if (routeName === 'Notifications') iconName = 'notifications';
else if (routeName === 'Readout') iconName = 'readout';
else if (routeName === 'Inbox') iconName = 'messages';
else if (routeName === 'Profile') iconName = 'profile';
//Tabicon is just custom Icon display widget . handle All tabicon in TabIcon by iconname
return <TabIcons iconName={iconName} tintColor={tintColor} />;
}
}
navigationOptions:({navigation}){
tabBarIcon:({tintColor})=>{
const{routeName}=navigation.state;
让我来;
if(routeName==='Home')iconName='Home';
else if(routeName=='Notifications')iconName='Notifications';
否则,如果(routeName==='Readout')iconName='Readout';
如果(routeName=='Inbox')图标名='messages',则为else;
如果(routeName==='Profile')iconName='Profile',则为else;
//Tabicon只是一个自定义图标显示小部件。通过图标名处理Tabicon中的所有Tabicon
返回;
}
}
你能解释更多吗??我真的需要在tab navigator[检查我的应用程序导航器]()中检查我的工作应用程序的自定义图标你能解释更多吗??我真的需要在tab navigator[检查我的应用程序导航器]()中检查我的工作应用程序的自定义图标