Zohar Levin Zohar Levin - 4 months ago 121
Android Question

How to find height of status bar in Android through React Native?

How can I find the height of the status bar on Android through React Native?

If I check the

React.Dimensions
height the value seems to include the status bar height too but I'm trying to find the height of the layout without the status bar.

Answer

You can use the npm package react-native-extra-dimensions-android, which provides the STATUS_BAR_HEIGHT that you can use to subtract from the REAL_WINDOW_HEIGHT.