Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

StatusBar.currentHeight should be dynamic on orientation change #22

Open
bryankang opened this issue May 9, 2019 · 0 comments
Open
Labels
bug Something isn't working Platform: Android

Comments

@bryankang
Copy link

On android devices, StatusBar.currentHeight returns the value of the status bar height for the orientation that the app was opened.

For devices like the Pixel 3 XL, it has two different status bar heights depending on orientation. The portrait uses a notch, so it's taller than the landscape counterpart.

When you launch the app on landscape, StatusBar.currentHeight returns 28. Launching it on portrait returns 40 something. Since these values are static, rotating the device results in the wrong status bar height for that orientation.

referencing facebook/react-native#24603

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Platform: Android
Projects
None yet
Development

No branches or pull requests

2 participants