Since this problem only occurs in Android, the recommended way to fix it will target Android specifically using the Platform :
import {Platform, StatusBar} from 'react-native'
const styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
android: {
marginTop: StatusBar.currentHeight
}
})
}
})
Where the container is the main container in the application.
<View style={{styles.container}}>
// rest of the code here
</View>
source
share