如何在 React Native 中将整个屏幕分成不同大小的部分
how to split entire screen into parts of various sizes in react native
我是 React-Native 的新手。请帮我解决这个问题。
我尝试了以下方法但无法垂直分割屏幕..
尝试以 百分比 更改高度。
<View style={{width: '100%', height: 150, backgroundColor: 'powderblue'}} />
<View style={{width: '100%', height: 150, backgroundColor: 'skyblue'}} />
<View style={{width: '100%', height: 150, backgroundColor: 'steelblue'}} />
</View> ```
2.
How to divide screen to two parts in react-native?
3.
你应该使用 Flexbox.
<View style={{flex: 1}}>
<View style={{flex: 1}}></View>
<View style={{flex: 1}}></View>
<View style={{flex: 1}}></View>
</View>
我是 React-Native 的新手。请帮我解决这个问题。 我尝试了以下方法但无法垂直分割屏幕..
尝试以 百分比 更改高度。
<View style={{width: '100%', height: 150, backgroundColor: 'powderblue'}} /> <View style={{width: '100%', height: 150, backgroundColor: 'skyblue'}} /> <View style={{width: '100%', height: 150, backgroundColor: 'steelblue'}} /> </View> ```
2.
How to divide screen to two parts in react-native?
3.
你应该使用 Flexbox.
<View style={{flex: 1}}>
<View style={{flex: 1}}></View>
<View style={{flex: 1}}></View>
<View style={{flex: 1}}></View>
</View>