Try using flex:1 along with maxWidth to both make it stretch but limit the width to 700
1 2 3 4 5 6 |
<View style={{flexDirection:'row', alignItems: 'center', justifyContent: 'center'}}> <View style={{flex:1, maxWidth: 700, backgroundColor:'red', flexDirection:'row', justifyContent:'space-between'}}> <Text>Left Item</Text> <Text>Right Item</Text> </View> </View> |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.