react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

False notch auto detect on "hideable" android menu. Bottom tab bar has like double size in height with react-navigation

Open Meinl opened this issue 4 years ago • 12 comments

Hi, I've installed last versions of react-navigation and react-native-safe-area-context, and we have an issue with Android bottom navigator. This behavior is occurring, at least on my phone (Asus Zenfone 5), and pretty sure in other that have that choice. In previous versions worked fine, that's mean, the bottom tab navigator goes up and down whit Android's navigation bar, isn't static like now with double height. I'm attaching a gif, the code is exactly the same and was taken of example of react navigation tabs (copy paste) from here: https://reactnavigation.org/docs/bottom-tab-navigator last snack example link. I've opened an issue days ago in react-navigation, but they told me that I have to open an issue here.

Thanks in advance.

86949485-b483c100-c11c-11ea-9ccf-08294225a04d

Meinl avatar Jul 13 '20 15:07 Meinl

I am having the same issue with Samsung S8

thetminko avatar Jul 16 '20 02:07 thetminko

Same issue

CDBridger avatar Jul 31 '20 04:07 CDBridger

changing from getSystemWindowInsetBottom to getStableInsetBottom seems to have been the problem which was applied between version 1.0.3 and 2.0.0 in the SafeAreaUtils.java

CDBridger avatar Jul 31 '20 05:07 CDBridger

Any news? Can't make it work. Thanks again.

Meinl avatar Aug 05 '20 19:08 Meinl

@Meinl you can use my fork in the meantime if you want. I reverted it back to using getSystemWindowInsetBottom which seemed to do the trick.

https://github.com/CDBridger/react-native-safe-area-context

CDBridger avatar Aug 05 '20 23:08 CDBridger

Interesting, I changed to getStableInsetBottom because getSystemWindowInsetBottom would change when the soft keyboard opens, which we don't want to match the iOS behavior. I didn't some android devices hide the navbar like this. I can probably use Math.min(getSystemWindowInsetBottom(), getStableInsetBottom()) instead.

janicduplessis avatar Aug 19 '20 19:08 janicduplessis

Could you check if version 3.1.6 fixes the issue?

janicduplessis avatar Aug 19 '20 19:08 janicduplessis

Could you check if version 3.1.6 fixes the issue?

I've updated to ^3.1.6 but not work. I assume because I'm using expo and I've checked expo dependencies in yarn.lock file and it's using ~3.0.7 version. I don't how to test it, can you help me? Thanks.

Meinl avatar Aug 19 '20 20:08 Meinl

The fix is in native code so sadly it won't work until expo updates this dependency. I think you'd have to eject to be able to update now.

janicduplessis avatar Aug 19 '20 21:08 janicduplessis

Same Problem here even after updating to 3.1.7 on an ejected project (not expo). Even if android navigation is hidden, the bottom insets are applied.

janweigel avatar Aug 31 '20 07:08 janweigel

@janicduplessis it does not work.

Jalson1982 avatar Sep 02 '20 12:09 Jalson1982

Any updates on this issue? Is there a fix expected in the foreseeable future? Does anybody know if it affects other devices? I've noticed it on a Samsung S8 too.

bogdanciobanu avatar Mar 16 '21 09:03 bogdanciobanu

This is for v3 of the library, and we're on v4. Please re-open a new issue if you're still facing issues

jacobp100 avatar Jan 19 '23 16:01 jacobp100