react-native-router-flux导航栏与内容区域重叠

问题描述 投票:1回答:1

使用以下代码,导航栏与内容区域重叠。 即没有出现“测试数据”文本。

<Scene key="root">
    <Scene key="ContentArea" component={ContentArea} title="Content" initial/>
</Scene>

class ContentArea extends Component {
  render() {
    return (
      <View style={{flex: 1}}>
        <Text>Test Data</Text>
      </View>
    );
  }
}

添加paddingTop之后,将显示文本“测试数据”。

<View style={{flex: 1, paddingTop: 50}}>

还有没有其他可能性,不使用样式属性'paddingTop'不将内容区域与导航栏重叠(主要目的是通过将paddingTop空间设置为50来避免硬编码值)。

react-native react-native-router-flux
1个回答
2
投票

不,我认为,您应该对更改进行硬编码。 这是此问题讨论的链接

https://github.com/aksonov/react-native-router-flux/issues/103

© www.soinside.com 2019 - 2024. All rights reserved.