SafeAreaView 设置安全区的外部

2020-06-17  本文已影响0人  精神病患者link常
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>

            </>
        )
    }
上一篇 下一篇

猜你喜欢

热点阅读