Rishav Kumar
Rishav Kumar

Reputation: 5460

Android Screen does not fit if the lower hardware navigation bar is hidden by the user on the apps built by react native

In android Oreo (test-case) if we hide the bottom hardware navigation bar through its inbuilt option, it produces an ugly UI and the screen does not fit to the empty space left behind. The screen should fit automatically if the bottom hardware navigation bar gets hidden, but I don't know how to do that. Please if someone could help

enter image description here

Upvotes: 1

Views: 375

Answers (1)

Umair Ahmed
Umair Ahmed

Reputation: 587

It depends on the version of React Native you are using. It was a known bug in the previous versions but it got fixed in this commit

https://github.com/facebook/react-native/commit/228a1fe7d48d57a0fbb2d852135ef94247198aaa

If are unable to upgrade to the latest RN due to expo not supporting it yet, you can use this package

https://github.com/Sunhat/react-native-extra-dimensions-android

This is deprecated, but works for the previous versions unless you are able to upgrade to the latest RN.

Upvotes: 1

Related Questions