0
空白添加在阵营母语,我有这个组件:防止外部组件在顶部
class List extends Component {
render() {
return (
<Provider store={store}>
<View style={ styles.container } >
<ListContainer />
</View>
</Provider>
);
}
}
的View
组件具有这种风格:
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignSelf: 'center',
alignItems: 'center',
flexDirection: 'row',
backgroundColor: '#000000',
}
});
这曾经占据了整个屏幕。不过,我加了StackNavigator
组件:
const MyApp = StackNavigator({
List: { screen: List },
OtherComponent: { screen: OtherComponent }
});
现在我的组件不会占据整个屏幕了。顶部有一个奇怪的白色空间。我相信现在我的View
组件嵌套在其他组件中,并以某种方式使它不占用全屏。
那么如何让我的View
再次占据整个屏幕?