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

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

オープン
#456 コメント 27 件 リアクション 24 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2.8k
フォーク
258
平均マージ
3日 1時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。