Created
December 17, 2019 09:42
-
-
Save minhajul-islam/67b2a4c62747df48fad9bde715047aeb to your computer and use it in GitHub Desktop.
Android & iPhone X(NOS) : SafeArea on top on the action bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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