Skip to content

Instantly share code, notes, and snippets.

@minhajul-islam
Created December 17, 2019 09:42
Show Gist options
  • Select an option

  • Save minhajul-islam/67b2a4c62747df48fad9bde715047aeb to your computer and use it in GitHub Desktop.

Select an option

Save minhajul-islam/67b2a4c62747df48fad9bde715047aeb to your computer and use it in GitHub Desktop.
Android & iPhone X(NOS) : SafeArea on top on the action bar
import {
...
SafeAreaView
} from 'react-native';
class Main extends React.Component {
render() {
return (
<SafeAreaView style={styles.safeArea}>
<App />
</SafeAreaView>
)
}
}
const styles = StyleSheet.create({
...,
safeArea: {
flex: 1,
backgroundColor: '#ddd'
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment