SafeAreaView 设置安全区的外部
image.png
render() {
return (
<>
<SafeAreaView style={{flex: 0,backgroundColor:'red'}}>
<View style={{alignItems:'center',justifyContent:'center'}}>
<Text>top</Text>
</View>
</SafeAreaView>
<SafeAreaView style={styles.container}>
</SafeAreaView>
<SafeAreaView style={{flex: 0,backgroundColor:'green'}}>
<View style={{alignItems:'center',justifyContent:'center'}}>
<Text>bottom</Text>
</View>
</SafeAreaView>
</>
)
}
本文标题:SafeAreaView 设置安全区的外部
本文链接:https://www.haomeiwen.com/subject/kbssxktx.html
网友评论