Javascript 从底部选项卡栏屏幕打开新屏幕后,返回时底部选项卡栏将隐藏在react native中
我对react-native不熟悉。我第一次使用底部选项卡栏。 因此,我创建了一个home.js,其中包含下面的导航代码Javascript 从底部选项卡栏屏幕打开新屏幕后,返回时底部选项卡栏将隐藏在react native中,javascript,node.js,reactjs,react-native,Javascript,Node.js,Reactjs,React Native,我对react-native不熟悉。我第一次使用底部选项卡栏。 因此,我创建了一个home.js,其中包含下面的导航代码 const TabNavigator = createMaterialBottomTabNavigator( { Home: { screen: Home, navigationOptions: { //tabBarLabel:'Home', activeColor: '#800080',
const TabNavigator = createMaterialBottomTabNavigator(
{
Home: {
screen: Home,
navigationOptions: {
//tabBarLabel:'Home',
activeColor: '#800080',
inactiveColor: '#000000',
labeled:false,
barStyle: { backgroundColor: 'white' },
tabBarIcon: ({ focused }) => {
const image = focused
? require('../../assets/images/homeactive.png') //active
: require('../../assets/images/Homeicon.png') //inactive
return (
<Image
source={image}
style={{height:15, width:15}}
/>
)
}
}
},
Profile: {
screen: Profile,
navigationOptions: {
//tabBarLabel:'Favourites',
labeled:false,
activeColor: '#800080',
inactiveColor: '#000000',
barStyle: { backgroundColor: 'white' },
tabBarVisible:true,
tabBarIcon: ({ focused }) => {
const image = focused
? require('../../assets/images/usericon.png') //active
: require('../../assets/images/userinactive.png') //inactive
return (
<Image
source={image}
style={{height:15, width:15}}
/>
)
}
}
}
} );
const TabNavigator=createMaterialBottomTabNavigator(
{
主页:{
屏幕:主页,
导航选项:{
//tabBarLabel:“主页”,
activeColor:“#800080”,
inactiveColor:“#000000”,
标签为:假,
barStyle:{backgroundColor:'white'},
tabBarIcon:({focused})=>{
常数图像=聚焦
?需要('../../assets/images/homeactive.png')//active
:require('../../assets/images/Homeicon.png')//不活动
返回(
)
}
}
},
简介:{
屏幕:配置文件,
导航选项:{
//tabBarLabel:“收藏夹”,
标签为:假,
activeColor:“#800080”,
inactiveColor:“#000000”,
barStyle:{backgroundColor:'white'},
塔巴:没错,
tabBarIcon:({focused})=>{
常数图像=聚焦
?需要('../../assets/images/usericon.png')//活动
:require('../../assets/images/userinactive.png')//inactive
返回(
)
}
}
}
} );
因此,点击配置文件,当我能够看到底部栏时,配置文件屏幕会被加载。当我试图从配置文件页面移动到editprofile屏幕时,底部栏会被隐藏,这很好。但是当我从editprofile移回配置文件时,我无法显示底部菜单。
profile.js和editprofile.js不包含任何底部选项卡条形码,它只存在于home.js中。。
所以请帮我展示一下