Closed
Description
MyCode
// Router
<Scene
key="feed_page"
hideNavBar={false}
hideTabBar={true}
initial={true}
component={FeedPage}
navBar={Header}
icon={FeedIcon}
sceneStyle={simula_styles.tab_scene}
/>
// Header.js
<View style={my_styles.header_container}>
<View style={my_styles.header_left}>
<Icon name="view-list" size={24} color='white'/>
</View>
<View style={my_styles.header_center}>
---element---
</View>
<View style={my_styles.header_right}>
<Icon name="search" onPress={this._toggleSearch} size={24} color='white'/>
</View>
</View>
// my styles
const my_styles = {
header_container: {
height: 50,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
header_left: {
width: 50,
height: 50,
padding: 13
},
header_right: {
width: 50,
height: 50,
padding: 13
},
header_center: {
flex: 4,
height: 50
}
}
Expected behaviour
Actual behaviour
I tried:
header_container: {
height: 50,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'flex-start'
}
but, NavBar doesn't move to top position.
Why my navbar doesn't move to top position??
Metadata
Metadata
Assignees
Labels
No labels