【发布时间】:2016-10-16 16:28:23
【问题描述】:
我想这样做,其中两个文本都在 1 条水平线上,其中一个在中心,另一个在右侧:
这是我拥有的,忽略颜色(根本不起作用):
风格:
rowLabelText: {
color: "#0B1219",
fontFamily: Fonts.Knockout31JuniorMiddleWeight,
fontSize: 16.0,
},
标记:
<View style={{flexDirection: 'row', height: 30, flexWrap: 'wrap', backgroundColor: 'green'}}>
<View style={{ flex: 1, backgroundColor: 'red', justifyContent: 'center', alignSelf: 'center'}}>
<Text style={styles.rowLabelText}>
adjkfdasjkfaskj
</Text>
</View>
<View style={{ flex: 1, backgroundColor: 'blue', justifyContent: 'center', alignSelf: 'flex-end' }}>
<Text style={styles.rowLabelText}>
adjkfdasjkfaskj
</Text>
</View>
</View>
我遇到了麻烦。有人可以帮助我吗?
【问题讨论】:
标签: react-native flexbox