Instawork / hyperview

Server-driven mobile apps with React Native
https://hyperview.org
MIT License
1.22k stars 57 forks source link

Allow Android navigation bar height calculation from server side #354

Open flochtililoch opened 2 years ago

flochtililoch commented 2 years ago

It appears that Android devices with a "software" navigation bar (most new Android devices) are not accounting for the height of the bar when rendering layout. This means that if the container at the edge of the screen does not explicitly account for the height of the bar, it might be rendered under the bar. Suggested way to calculate this. We already send the value returned by Dimensions.get('window') in a HTTP header. We might need to expose two new headers, with the values of:

Or we might want to do the calculation on the client side, and implement our own "safe-area" wrapper to re-use our existing, iOS only attribute safe-area.

adamstep commented 2 years ago

Another option: check out https://github.com/th3rdwave/react-native-safe-area-context for safe area support on Android