TextInput
的这两个属性与 android 不兼容:
自动更正
secureTextEntry
当我有自动更正功能时,我遇到了以下错误:
Error while updating property 'autoCorrect' of a view managed by: AndroidTextInput
当我有 secureTextEntry 时,我遇到以下错误:
Error while updating property 'password' of a view managed by: AndroidTextInput
有谁知道如何处理这个问题吗?
这是我的代码:
<Text style={styles.text}>{text.Email}</Text>
<View style={styles.inputRow}>
<Image style={externalStyles.styles.iconImage} resizeMode="contain" source={externalImags.Images.emailIcon} />
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({email: text})}
value={this.state.email}
keyboardType="email-address"
placeholder={text.email}
autoCorrect="false"
clearButtonMode="always"/>
</View>
<Text style={styles.text}>{text.Password}</Text>
<View style={styles.inputRow}>
<Image style={externalStyles.styles.iconImage} resizeMode="contain" source={externalImags.Images.passwordIon} />
<TextInput
style={styles.textInput}
onChangeText={(text) => this.setState({password: text})}
value={this.state.password}
keyboardType="default"
placeholder={text.password}
autoCorrect="false"
secureTextEntry="ture"
clearButtonMode="always"/>
</View>
最佳答案
您应该使用 autoCorrect={false}
关于android - react-native,这些属性与android不兼容: autoCorrect and secureTextEntry,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36524960/