Open jzxchiang1 opened 2 years ago
Same here. We have customer reports of wrong status bar padding on a Pixel 5. We're not using this package, but also use StatusBar.currentHeight to get the value on Android. It appears to be a react-native problem on Pixel phones :(
Same here. We have customer reports of wrong status bar padding on a Pixel 5. We're not using this package, but also use StatusBar.currentHeight to get the value on Android. It appears to be a react-native problem on Pixel phones :(
I spent a couple hours looking into this.
The best solution I've found is to use react-native-safe-area-context
.
Then, an accurate status bar height can be retrieved from useSafeAreaInsets().top
. Better than any other solution out there. In fact, it is the one recommended by Expo.
Title says it all...