在 React Native 中更详细地检测缺口

Detecting the notch in more details in React Native

我搜索并检查了这 2 个链接

https://github.com/ovr/react-native-status-bar-height

我得到的,我可以检测到缺口高度,但我想知道更多细节

顶部和底部的高度是多少

因为我当前的设备底部有凹口,并且 IPhone X 在顶部和底部都有凹口,每侧的高度尺寸不同

使用 SafeAreraView 没有帮助

请查看附件图片

Check this image

我认为 Expo 36 在 android 上没有全屏选项(隐藏底部导航栏)。它将在下一个版本中可用:https://github.com/expo/expo/pull/7049

你应该等待下一个 expo 发布然后尝试(上面 PR 中的说明):

in app.json
{
  androidNavigationBar: {
    visible: 'leanback' // or some other type you want
  }
}