I'm using NativeBase with Exponent. The Header goes beneath the phone's StatusBar. You can see this in the NativeBase demo that Exponent released.
Does anyone have a fix for this?
I'm using NativeBase with Exponent. The Header goes beneath the phone's StatusBar. You can see this in the NativeBase demo that Exponent released.
Does anyone have a fix for this?
Since this issue only comes up in Android, the recommended way to fix this would be to target Android specifically using Platform :
Where container is the main container in the app.
I ended up adding a marginTop with the value of the device's StatusBar.
In my global stylesheet:
I found a better way to handle this using the StyleProvider with my theme, and then into de components folder (native-base-theme/components) found the Header.js file and change the paddintTop value (around 305 line)
Old post but recently I've faced same issue with Expo. And I overcome this issue by adding this line to app.json file.
app.json file
That solved my issue. I think this may help to others.