Hi, there. Thank you for a great library.
I have a question about the correspondence of SafeArea.
If we place SafeAreaView outside or inside the Container, the Footer will not be placed properly.
I need this for a layout where the Header does not exist, but is there a way?
<View style={{ flex: 1 }}>
<StatusBar />
<Authenticated>
<Router>
<Container>
<Content>
<Route exact path="/" component={withErrorBoundary(HomeScreen)} />
<Route path="/settings" component={withErrorBoundary(SettingScreen)} />
</Content>
<Footer>
<FooterTab>
<Button vertical full>
<Icon type="MaterialIcons" name="home" style={Styles.appleBlue} />
<Text style={Styles.appleBlue}>Home</Text>
</Button>
<Button vertical full><Icon type="MaterialIcons" name="settings" /><Text>Setting</Text></Button>
</FooterTab>
</Footer>
</Container>
</Router>
</Authenticated>
</View>
<View style={{ flex: 1 }}>
<StatusBar />
<Authenticated>
<Router>
<Container>
<SafeAreaView>{/* <---- */}
<Content>
<Route exact path="/" component={withErrorBoundary(HomeScreen)} />
<Route path="/settings" component={withErrorBoundary(SettingScreen)} />
</Content>
</SafeAreaView>{/* <---- */}
<Footer>
<FooterTab>
<Button vertical full>
<Icon type="MaterialIcons" name="home" style={Styles.appleBlue} />
<Text style={Styles.appleBlue}>Home</Text>
</Button>
<Button vertical full><Icon type="MaterialIcons" name="settings" /><Text>Setting</Text></Button>
</FooterTab>
</Footer>
</Container>
</Router>
</Authenticated>
</View>
<View style={{ flex: 1 }}>
<StatusBar />
<Authenticated>
<Router>
<Container>
<Content>
<SafeAreaView>{/* <---- */}
<Route exact path="/" component={withErrorBoundary(HomeScreen)} />
<Route path="/settings" component={withErrorBoundary(SettingScreen)} />
</SafeAreaView>{/* <---- */}
</Content>
<Footer>
<FooterTab>
<Button vertical full>
<Icon type="MaterialIcons" name="home" style={Styles.appleBlue} />
<Text style={Styles.appleBlue}>Home</Text>
</Button>
<Button vertical full><Icon type="MaterialIcons" name="settings" /><Text>Setting</Text></Button>
</FooterTab>
</Footer>
</Container>
</Router>
</Authenticated>
</View>
|Case1 (without SafeAreaView)|Case2 (with SafeAreaView)|Case3(SafeAreaView in Content)|Case3 scroll|
|--|--|--|--|
|
|
|
|
|
Both.
Sorry, it was my mistake.
It was solved by specifying flex.
<SafeAreaView style={{flex:1}}>
<Content>
<Route exact path="/" component={withErrorBoundary(HomeScreen)} />
<Route path="/settings" component={withErrorBoundary(SettingScreen)} />
</Content>
</SafeAreaView>
Most helpful comment
Sorry, it was my mistake.
It was solved by specifying flex.