Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong status bar height on Pixel 6 #38

Open
jzxchiang1 opened this issue Mar 17, 2022 · 2 comments
Open

Wrong status bar height on Pixel 6 #38

jzxchiang1 opened this issue Mar 17, 2022 · 2 comments

Comments

@jzxchiang1
Copy link

Title says it all...

@andrewzey
Copy link

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 :(

@jzxchiang1
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants