xxxxxxxxxx
import React from 'react';
import { View, Text } from 'react-native';
const App = () => {
return (
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ flex: 1, backgroundColor: 'red' }}></View>
<View style={{ flex: 2, backgroundColor: 'blue' }}></View>
<View style={{ flex: 1, backgroundColor: 'green' }}></View>
</View>
);
};
export default App;
xxxxxxxxxx
import React from 'react';
import { View, Text } from 'react-native';
const App = () => {
return (
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ flex: 1, backgroundColor: 'red' }}>
<Text style={{ color: 'white' }}>Item 1</Text>
</View>
<View style={{ flex: 2, backgroundColor: 'blue' }}>
<Text style={{ color: 'white' }}>Item 2</Text>
</View>
<View style={{ flex: 1, backgroundColor: 'green' }}>
<Text style={{ color: 'white' }}>Item 3</Text>
</View>
</View>
);
}
export default App;