【问题标题】:How to add a fixed header for all screens in react-native-navigation v2?如何在 react-native-navigation v2 中为所有屏幕添加固定标题?
【发布时间】:2019-01-11 19:58:10
【问题描述】:

我想知道是否可以在 react-native-navigation v2 中为所有屏幕添加固定标题。像这样的:

<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>

每当我将标签切换到另一个屏幕时,理想情况下我希望始终看到相同的横幅。

【问题讨论】:

    标签: react-native react-native-navigation


    【解决方案1】:

    Overlay 中显示横幅。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-07
      • 2019-01-29
      • 1970-01-01
      • 1970-01-01
      • 2021-09-13
      • 2018-12-27
      • 1970-01-01
      • 2017-12-31
      相关资源
      最近更新 更多