ScrollView无法在react-native-router-flux上运行!
index.js:
<Router>
<Scene
key="root">
<Scene key="layout2" component={layout2} title="Layouttwo" />
<Scene key="Layout1" component={Layout1} title="layouOne" />
</Scene>
</Router>
布局1:
<ScrollView>
<Grid>
<Row>
<Col>
<Text onPress={Actions.Layout1}>Bonjour Sofiane!</Text>
</Col>
<Col>
<ListView dataSource={this.state.table1Source} renderRow={this.renderRowtable1.bind(this)} enableEmptySections={true} />
</Col>
</Row>
<Row>
<Col>
<TextInput placeholder="Input1" onChangeText={(text) => this.setState({Input1: text})} value={this.state.Input1}/>
</Col>
<Col>
<Button title='Ajouter' onPress={() => this.remlirTable()} onLongPress={() => this.alerte()}/>
</Col>
</Row>
</Grid>
</ScrollView>
而不是:
感谢。
答案 0 :(得分:0)
你应该像这样编写代码:
<View style={{marginTop: 50, }}>
<ScrollView>
//Hir your code... Row,col...
</ScrollView>
</View>