Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bottom inset on samsung galaxy S23 Ultra (physical device) is 0 #466

Open
brilliantinsane opened this issue Jan 19, 2024 · 7 comments
Open

Comments

@brilliantinsane
Copy link

const insets = useSafeAreaInsets();
console.log('insets ????', insets);
result --> insets ???? {"bottom": 0, "left": 0, "right": 0, "top": 28.571428298950195}

Above log is from Samsung Galaxy S23 Ultra physical device using ExpoGo

package.json --> "react-native-safe-area-context": "4.6.3"

On iOS everything is fine and good, I am getting insets like normal, but on the S23 Ultra (physical device), the bottom inset is 0, also on the simulator Pixel 6 Pro API 33. What am I doing wrong here? Why is it 0?

I see that most of the issues about insets being 0 are related to the top inset and that the problem is usually caused somehow by <StatusBar /> but here I don't have this problem, my problem is with the system's bottom navigation where that "handle" is.

Any suggestions?

@Orange9000
Copy link

Orange9000 commented Feb 14, 2024

Same for our app on samsung devices. We're using FLAG_LAYOUT_NO_LIMITS, so it is vital to receive correct insets.

We had to use a whole separate module to determine bottom inset. Which is, essentially a navigation bar. That is one way to solve it. The module is react-native-android-navbar-height

@agusvazquez
Copy link

agusvazquez commented Mar 14, 2024

Hello! Having the same issue.

Not sure if helps but I am using

"react-native-safe-area-context": "^4.9.0"

and on the activity manifest files

android:windowSoftInputMode="adjustPan"

@jacobp100
Copy link
Collaborator

There’s definitely some configuration that we’re missing the documentation for here. If you fancy taking a stab at documenting, PRs are happily accepted

@jektvik
Copy link

jektvik commented Aug 31, 2024

I'm seeing the same on physical samsung Galaxy S22+
as well as emulated Pixel 8 Pro

{"bottom": 0, "left": 0, "right": 0, "top": 0} all the time

So the lib essentialy doesn't work anywhere I've tried

@jacobp100 how do you mean missing documentation ? it seems more like the lib is flat out dead ?

@ckaznable
Copy link

Same problem on physical sony xperia 1 V

@wilkinsonj
Copy link

Hey guys, this is quite a fundamental issue, no? Seeing the same thing on a Samsung Android

@wilkinsonj
Copy link

Update... happy to report it was user error. The correct value was 0.

The starting point of the usable screen at the bottom is the top of the Android status bar. So 0 is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants