jobtoday/react-native-image-viewing

Is it possible to wrap SafeAreaView inside modal?

Closed this issue · 1 comments

When I try to customize the header component, here I found header is displaying outside the safe area.

image

Which is quite annoying, I don't want a non-fullscreen view in this situation. I did't fine any property or method to avoid this,

<SafeAreaView>
    <ImageView />
</SafeAreaView>

Code above is also not working because the <SafeAreaView> is outside the modal I guess.
Anyone know how to solve this problem? thank you.

Sorry guys, I think it was my fault...

Firstly I tried wrap <SafeAreaView> to the customized header, It didn't work, then I thought it was a wrong way to do it.

Until I found <SafeAreaView> in default header component...
The thing is, import { SafeAreaView } from 'react-native-safe-area-context' is not working, but import { SafeAreaView } from 'react-native' is working properly now.
😅
My bad