React native 按住textInput时,react native Scroll不工作

React native 按住textInput时,react native Scroll不工作,react-native,react-native-android,React Native,React Native Android,我有android应用程序和注册表。其代码: <View style={{flex:1}}> <ScrollView style={{flex:1, backgroundColor='#ffffff'}}> <More components...> <TextInput style={styles.inputText} value={this.state.mail}

我有android应用程序和注册表。其代码:

<View style={{flex:1}}>
    <ScrollView style={{flex:1, backgroundColor='#ffffff'}}>
        <More components...>
        <TextInput style={styles.inputText} 
                   value={this.state.mail}
                   placeholder="Email"
                   onChangeText={(text)=>this.setState.(mail:text)}/>
        <TextInput style={styles.inputText} 
                   value={this.state.fName}
                   placeholder="First name"
                   onChangeText={(text)=>this.setState.(fName:text)}/>
        <TextInput style={styles.inputText} 
                   value={this.state.sName}
                   placeholder="Second name"
                   onChangeText={(text)=>this.setState.(sName:text)}/>
        <More components...>
    </ScrollView>
</View>

this.setState.(邮件:text)}/>
this.setState.(fName:text)}/>
this.setState.(sName:text)}/>
但当用户按住TextInput并开始滚动时,视图不会滚动。在其他控件中,滚动效果良好。


<ScrollView style={{flex:1, backgroundColor='#ffffff'}}>
<View style={{flex:1}}>    
    <More components...>
    <TextInput style={styles.inputText} 
               value={this.state.mail}
               placeholder="Email"
               onChangeText={(text)=>this.setState.(mail:text)}/>
    <TextInput style={styles.inputText} 
               value={this.state.fName}
               placeholder="First name"
               onChangeText={(text)=>this.setState.(fName:text)}/>
    <TextInput style={styles.inputText} 
               value={this.state.sName}
               placeholder="Second name"
               onChangeText={(text)=>this.setState.(sName:text)}/>
    <More components...>
this.setState.(邮件:text)}/> this.setState.(fName:text)}/> this.setState.(sName:text)}/>


scroll元素必须包含一个视图

建议仅当TextInput右对齐时才会发生: