TextInput的这两个属性与android不兼容:
autoCorrectsecureTextEntry当我拥有autoCorrect时,我遇到了以下错误:
更新由:autoCorrect管理的视图的属性“AndroidTextInput”时出错
当我拥有secureTextEntry时,我遇到了以下错误:
更新由: 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>发布于 2020-09-30 16:30:25
您应该使用autoCorrect={false}
发布于 2016-04-10 18:12:46
这是你的问题。
autoCorrect="false"将在iOS上工作,而不是安卓。
对于安卓来说,它必须是autoCorrect={"false"}。
我发现反应-原生iOS原谅一些“坏习惯语法”,安卓不是。
对于这两种情况,都应该使用autoCorrect={'false'}。总是在{}中放置道具
https://stackoverflow.com/questions/36524960
复制相似问题