appandflow / appandflow/react-native-safe-area-context

[Android] SafeAreView is not working on Android with notch, tested on Pixel 7 emulator

未關閉
#456 27 則留言 24 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
2.8k
分支
258
平均合併
3 天 1 小時
30 天內合併 PR
2

描述

Hey,
I've noticed that the SafeAreaView is not working on the Pixel 7 emulator. Any ideas on how it might be fixed? :)

Here's a screenshot:

Screenshot 2023-11-15 at 18 42 22

Code:
```
import React from 'react'
import { SafeAreaProvider, SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'
import { Text, View } from 'react-native'

const TestComponent = () => {
const insets = useSafeAreaInsets()

console.log('insets', insets) // LOG insets {"bottom": 0, "left": 0, "right": 0, "top": 0}

return (


Here Android notch Pixel 7 Here Android notch Pixel 7 Here Android notch Pixel 7


)
}

export const App = (): JSX.Element => {
return (



)
}
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。