gpt4 book ai didi

javascript - 在 DrawerNavigator 中隐藏标题( react 导航)

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:30:33 25 4
gpt4 key购买 nike

嘿..

我目前正在研究 react-navigation 并试图解决抽屉打开时标题未隐藏的问题...

enter image description here

我希望任何人都可以分享如何解决这个有问题的 header ..下面我附上了我在 StackNavigator 中集成 DrawerNavigator 的代码。

const Home = DrawerNavigator({
HomeMenu: { screen: HomeMenu },
Messages: { screen: Messages },
Notifications: { screen: Notifications },
Badges: { screen: Badges },
Leaderboard: { screen: Leaderboard },
Profile: { screen: Profile },
Logout: { screen: Logout }
});

const MainActivity = StackNavigator({
Home: { screen: Home }
})

提前致谢!

最佳答案

您可以像这样隐藏标题:-

const Home = DrawerNavigator({
HomeMenu: { screen: HomeMenu,
navigationOptions: {
header:false, //hide header if not needed so whole screen slide

},
},
Messages: { screen: Messages },
Notifications: { screen: Notifications },
Badges: { screen: Badges },
Leaderboard: { screen: Leaderboard },
Profile: { screen: Profile },
Logout: { screen: Logout }
});

const MainActivity = StackNavigator({
Home: { screen: Home }
})

关于javascript - 在 DrawerNavigator 中隐藏标题( react 导航),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44039957/

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