我已经尝试了所有的方法,但当我取消键盘时,焦点也会失去。但当我希望用户将信息粘贴到TextInput中时,我不想显示软键盘。
<TextInput
ref='barcodeInput'
style={{height: 60,borderColor: '#000000', borderWidth: 1, width:300, fontSize:30}}
underlineColorAndroid="transparent"
onChangeText={(text) => this.setState({inputBarcode:text})}
onSubmitEditing={this.handleSubmitEditing.bind(this)}
keyboardType = {'numeric'}
/>
keyboard.dismiss
中,却没有给出防止这种行为的选项。 - sbearben