I write a code like this:
<View style={{flex:1}}> <ScrollView style={{flex:1, backgroundColor='#ffffff'}}> <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)}/> </ScrollView> </View>
but when i drag start in TextInput does not scroll! i drag like this picture: enter image description here but not scroll…
Advertisement
Answer
Problem solved. I just add this props to TextInput Components:
multiline={true} numberOfLines={1}