Reactjs react本机react导航V2不显示屏幕标题

Reactjs react本机react导航V2不显示屏幕标题,reactjs,react-native,react-navigation,Reactjs,React Native,React Navigation,我最近在React原生应用程序中使用了React导航,我将React导航1.*更新为2.*现在,在我使用CreateBoottomTabNavigator之后,屏幕标题不会显示 这是我在主屏幕上的代码 static navigationOptions =({navigation})=> { return { headerTitle: <Logo type="default_logo" />, headerTitleStyle: { alignItems: "cent

我最近在React原生应用程序中使用了React导航,我将React导航1.*更新为2.*现在,在我使用CreateBoottomTabNavigator之后,屏幕标题不会显示

这是我在主屏幕上的代码

static navigationOptions =({navigation})=> {


return {
  headerTitle: <Logo type="default_logo" />,
  headerTitleStyle: { alignItems: "center" },
  headerStyle: {
    paddingRight: 10,
    paddingLeft: 10
  },
  headerLeft: (
    <ClickableIcon
      source={NotificationInactive}
      height={35}
      width={35}
      onIconPressed={() => alert("Notifications Clicked")}
    />
  ),
  headerRight: (
    <ClickableIcon
      height={35}
      width={35}
      source={AddNewUserInactive}
      onIconPressed={() => alert("Add New Clicked")}
    />
  )
}
静态导航选项=({navigation})=>{
返回{
标题:,
headerTitleStyle:{alignItems:“center”},
头型:{
paddingRight:10,
paddingLeft:10
},
左校长:(
警报(“单击通知”)}
/>
),
头灯:(
警报(“添加新单击”)}
/>
)
}

}尝试使用以下代码:

{
            stack: {
                children: [
                    {
                        component: {
                            name: 'demoApplication.NewsListScreen',  //tab component
                        }
                    }
                ],
                options: {           // try options for topbar and bottom tabs       
                    bottomTab: {
                        text: 'Users',
                        icon: require('../../assets/images/two.png')
                    },
                    topBar: {
                        drawBehind: false,
                        background: {
                            color: 'transparent'
                        },
                        title: {    // Title can be used as text or component
                            component: {
                                id: "LogoComponent",
                                name: 'app.LogoComponent',
                                alignment: 'center'
                            }
                            // text:"title"
                        },
                        leftButtons: [{
                            icon: require("../../assets/images/one.png"),
                            id: "left",
                            enabled: true,
                            buttonColor: "green",
                            color:"red",
                            disableIconTint: true,
                        }],
                        rightButtons: [{
                            icon: require("../../assets/images/two.png"),
                            id: 'right',
                            enabled: true,
                            buttonColor: "#green",
                            color:"red",
                            disableIconTint: true,
                        }]
                    }
                } 
            }
          }

导航选项与屏幕导航选项合并的方式在v2.0.0中发生了变化。所以,检查这个链接的变化,我认为它是相同的