效果:

center:伸缩项目向一行的中间位置靠齐
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置子项目在主轴上的对齐方式
justifyContent:'center'
},
效果:

space-between:两端对齐,项目之间的间隔都相等
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置子项目在主轴上的对齐方式
justifyContent:'space-between'
},
效果:

space-around:伸缩项目会平均分布在行内,两端保留一半的空间
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置子项目在主轴上的对齐方式
justifyContent:'space-around'
},
效果:

alignItems(定义项目在交叉轴上如何对齐,可以把它看成侧轴(垂直于主轴)的对齐方式)flex-start(默认):侧轴轴的起点对齐
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置项目在侧轴上如何对齐
alignItems:'flex-start'
},
效果:

flex-end:
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置项目在侧轴上如何对齐
alignItems:'flex-end'
},
效果:

center:侧轴的中点对齐
container: {
backgroundColor:'blue',
height:Dimensions.get('window').height,
width:Dimensions.get('window').width,
// 设置项目在侧轴上如何对齐
alignItems:'center'
},










