Я хотел бы иметь заголовок с заголовком слева и меню справа. Между текстом разной длины. Теперь я хочу, чтобы текст был вырезан, если он слишком длинный.React native flexible header
<View style={styles.header}>
<View style={styles.headline}>
<Text style={styles.headlineFluorine}>{"Fluorine "}</Text>
<Text style={styles.headlinePath}>{this.props.text}</Text>
</View>
<View ref="navi" style={styles.nav}>
<NavButton onPress={() => { this.props.navigator.push({id: 'drawings',}); }} text={textMyDrawings} />
<NavButton onPress={() => { this.props.navigator.push({id: 'users',}); }} text={textUsers} />
<NavButton onPress={() => { this.props.navigator.push({id: 'templates',}); }} text={textTemplates} />
<NavButton onPress={() => { this.props.navigator.push({id: 'logout',}); }} text={textLogout} />
</View>
</View>
header: {
flexDirection: 'row',
//justifyContent: 'space-around',
backgroundColor: '#DDDDDD',
},
headline: {
flexDirection: 'row',
overflow: 'hidden',
},
headlineFluorine: {
textAlign: 'left',
color: '#666666',
fontSize: 24,
margin: 10,
},
headlinePath: {
fontSize: 18,
textAlign: 'left',
margin: 13,
overflow: 'hidden',
},
nav: {
flexDirection: 'row',
},
Спасибо, сейчас я сделал это таким образом. Но лучшее решение для меня было бы более гибким. –