我正在尝试呈现一个导航栏自定义右按钮。
React-native-router-flux版本:^3.43.0
代码看起来像这样:
<Scene
initial
key="RegistrationType"
navigationBarStyle={Style.navBarStyleBlue}
renderRightButton={() => (
<View style={{
backgroundColor: 'yellow',
height: 50,
alignItems: 'center',
justifyContent: 'center'
}}>
<TouchableOpacity onPress={Actions.Login}>
<Text>Login</Text>
</TouchableOpacity>
</View>
)}
component={RegistrationType}
title=""
hideNavBar={false}
/>导航栏的风格:
navBarStyleBlue: {
backgroundColor: 'blue',
borderBottomWidth: 0,
height: 50
},所以基本上我尝试让正确的按钮与导航栏垂直对齐,并得到如下所示:

但我得到的却是这个:

有什么想法吗?
https://stackoverflow.com/questions/47576774
复制相似问题