safe area view react native code example

Example 1: react is there a safe area view for android

import { StyleSheet, Platform } from 'react-native';
export default StyleSheet.create({
    droidSafeArea: {
        flex: 1,
        backgroundColor: npLBlue,
        paddingTop: Platform.OS === 'android' ? 25 : 0
    },
});

Example 2: react is there a safe area view for android

import GlobalStyles from './GlobalStyles';
import { SafeAreaView } from "react-native";

render() {
    return (
      
          //More controls and such
      
    );
  }
}

Example 3: safeareaview

import SafeAreaView from 'react-native-safe-area-view';


  
    Yeah, I'm safe too!
  

Tags:

Misc Example