react-native-cli: 2.0.1
react-native: 0.52.2
在我的 ios 设备中,表单看起来不错,但在 Android 设备中,它在 TextInput 上显示底部边框,
class Input extends Component {
render(){
return(
<View style={styles.container}>
<Text style={styles.lableStyle}>{this.props.label}</Text>
<TextInput
secureTextEntry={this.props.secureTextEntry}
placeholder={this.props.placeHolder}
autoCorrect={false}
value={this.props.value}
onChangeText={this.props.onChangeText}
underlineColorAndroid={this.props.borderColor} // not working
style={styles.textInputStyle} />
</View>
);
}
}
从 LoginForm 传递道具:
render(){
return(
<Card>
<CardSection>
<Input
borderColor="transparent" //props for border
label="Email"
placeHolder="[email protected] /cdn-cgi/l/email-protection"
onChangeText={this.onEmailChanged.bind(this)}
value={this.props.email}
/>
</CardSection>
<CardSection>
<Input
borderColor="transparent" // props for border
secureTextEntry
label="Password"
placeHolder="password"
onChangeText={this.onPasswordChanged.bind(this)}
value={this.props.password}
/>
</CardSection>
{this.errorRender()}
<CardSection>
{this.spinerRender()}
</CardSection>
</Card>
);
}
mac 的屏幕截图
安卓系统截图
在您的登录表单中将您的更改为此
<Input
borderColor='transparent'// props for border
secureTextEntry
label="Password"
placeHolder="password"
onChangeText={this.onPasswordChanged.bind(this)}
value={this.props.password}
/>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)