Quantcast
Viewing all articles
Browse latest Browse all 17061

How do you prevent the bottom area in a React Native SafeAreaView from overlapping over the content?

I'm implementing a <SafeAreaView> on my React Native app. Most of my screens are in a ScrollView. When I add the <SafeAreaView>, it obstructs the content. While I want this bottom area to be "safe", I'd like the user to be able to see the content behind it, otherwise, the space is wasted.

How do I implement a "transparent" safe area?

Simplified example:

class ExampleScreen extends Component {
  render() {
    return (
      <SafeAreaView>
        <Scrollview>
          <Text>Example</Text>
          <Text>Example</Text>
          <Text>Example</Text>
          (etc)
        </Scrollview>
      </SafeAreaView>
    );
  }
}

Output:

Image may be NSFW.
Clik here to view.

Desired Output:

Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 17061

Trending Articles