これは、position: 'absolute'を使用して、上、左、右、下のプロパティを揃えて行うことができます。ここでは、作業サンプルrnplayにも
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
} = React;
var SampleApp = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.topLeft}> Top-Left</Text>
<Text style={styles.topRight}> Top-Right</Text>
<Text>Center</Text>
<Text style={styles.bottomLeft}> Bottom-Left</Text>
<Text style={styles.bottomRight}> Bottom-Right</Text>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
marginTop: 24
},
topLeft:{
position: 'absolute',
left: 0,
top: 0
},
topRight:{
position: 'absolute',
right: 0,
top: 0
},
bottomLeft:{
position: 'absolute',
left: 0,
bottom: 0
},
bottomRight:{
position: 'absolute',
right: 0,
bottom: 0
}
});
AppRegistry.registerComponent('SampleApp',() => SampleApp);
、
https://rnplay.org/apps/n6JJHg
すごいです、それは素晴らしいです!私はReact Nativeの公式フレックスボックス文書を読んでいた時私はちょっと不注意だと思います。ありがとうございました! – Harreke