【发布时间】:2019-04-01 05:11:13
【问题描述】:
我使用反应导航,我在栏中将标题居中,但它受到 headerLeft 的影响, 当我关闭它们时,它的工作和标题准确地居中, 如何在不影响标题的情况下使用另一个左右按钮\icon
代码:
const RootNavigator = createStackNavigator({
Home: {
screen: Home,
navigationOptions: {
title: "Home",
//headerLeft: null, // here the issue
headerStyle: {
backgroundColor: 'rgb(42,55,68)',
},
headerTitleStyle: {
flex: 1,
textAlign: 'center',
color: "#fff",
}
}
}
});
【问题讨论】:
标签: javascript reactjs react-native react-redux react-navigation