如何在 react-native-navigation v2 中为所有屏幕添加固定的 header?
How to add a fixed header for all screens in react-native-navigation v2?
我想知道是否可以在 react-native-navigation v2 中为所有屏幕添加一个固定的 header。像这样:
<View style={{flex: 1}}>
<View style={{flex: 0.3}}>
<Text>Fixed Banner</Text>
</View>
<View style={{flex: 0.7}}>
Navigation.setRoot({
root: {
bottomTabs: {
id: 'BottomTabsId',
children: [
{
component: {
name: 'SignIn',
options: {
bottomTab: {
fontSize: 12,
text: 'Sign In',
icon: require('./signin.png')
}
}
},
},
...
],
}
</View>
</View>
每当我将选项卡切换到另一个屏幕时,理想情况下我希望始终看到相同的横幅。
在 Overlay 中显示横幅。
我想知道是否可以在 react-native-navigation v2 中为所有屏幕添加一个固定的 header。像这样:
<View style={{flex: 1}}>
<View style={{flex: 0.3}}>
<Text>Fixed Banner</Text>
</View>
<View style={{flex: 0.7}}>
Navigation.setRoot({
root: {
bottomTabs: {
id: 'BottomTabsId',
children: [
{
component: {
name: 'SignIn',
options: {
bottomTab: {
fontSize: 12,
text: 'Sign In',
icon: require('./signin.png')
}
}
},
},
...
],
}
</View>
</View>
每当我将选项卡切换到另一个屏幕时,理想情况下我希望始终看到相同的横幅。
在 Overlay 中显示横幅。