Home > Enterprise >  Is there a way to disable SafeAreaView in a specific screen?
Is there a way to disable SafeAreaView in a specific screen?

Time:08-13

I'm currently wrapping my Components in a SafeAreaView like below in my App.js file

<SafeAreaView>
  <ComponentTree />
</SafeAreaView>

But I want to disable SafeAreaView on a specific screen to make it full screen.

What I'm currently thinking is to wrap every screen with SafeAreaView without the specific screen which I don't want a SafeAreaView. Can it be achieved in another way?

CodePudding user response:

try this

import SafeAreaView from 'react-native-safe-area-view';

<SafeAreaView forceInset={{ top: 'always' }}>
  <View>
    <Text>Yeah, I'm safe too!</Text>
  </View>
</SafeAreaView>

CodePudding user response:

You can use modal to show something on full screen, besides it is in safe area view. I think that you can't override safe area view in the way you want.

  • Related