Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios react native中的TextInput显示带颜色背景的文本值_Ios_Css_React Native_Textinput - Fatal编程技术网

Ios react native中的TextInput显示带颜色背景的文本值

Ios react native中的TextInput显示带颜色背景的文本值,ios,css,react-native,textinput,Ios,Css,React Native,Textinput,我试图在react native中创建一个带有半透明文本输入的登录屏幕。但是,当我在输入中键入文本时,有一种奇怪的行为:键入的文本看起来像是高亮显示的(但不是)。正如您在此屏幕截图上看到的: (似乎无法上传到imgur,因此:) 这是我的密码: 类LoginForm扩展组件{ //#地区建设者 建造师(道具){ //组件施工图 超级(道具); //在“成分的固有属性”上草签 此.state={ 孤岛加载:false, 用户名输入:“”, 密码输入:“”, URL输入:“”, 端口输入:“443

我试图在react native中创建一个带有半透明文本输入的登录屏幕。但是,当我在输入中键入文本时,有一种奇怪的行为:键入的文本看起来像是高亮显示的(但不是)。正如您在此屏幕截图上看到的:

(似乎无法上传到imgur,因此:)

这是我的密码:

类LoginForm扩展组件{
//#地区建设者
建造师(道具){
//组件施工图
超级(道具);
//在“成分的固有属性”上草签
此.state={
孤岛加载:false,
用户名输入:“”,
密码输入:“”,
URL输入:“”,
端口输入:“443”
};
}
//#端区
//#区域生命周期组成部分
componentDidMount(){
}
render(){
返回(
this.passwordInput.focus()}
自动更正={false}
keyboardType='email-address'
returnKeyType=“下一步”
占位符=“*电子邮件*”
占位符文本颜色={COLOR\u GREY\u 300}
值={this.state.usernameInput}
onChangeText={text=>this.setState({usernameInput:text})}/>
this.passwordInput=input}
onSubmitEditing={()=>this.urlInput.focus()}
占位符='*Mot de passe*'
returnKeyType=“下一步”
占位符文本颜色={COLOR\u GREY\u 300}
secureTextEntry
值={this.state.passwordInput}
onChangeText={text=>this.setState({passwordInput:text})}/>
this.portInput.focus()}
ref={(输入)=>this.urlInput=input}
自动更正={false}
returnKeyType=“下一步”
占位符='*地址url*'
占位符文本颜色={COLOR\u GREY\u 300}
值={this.state.urlInput}
onChangeText={text=>this.setState({urlInput:text})}/>
this.portInput=input}
自动更正={false}
键盘类型=“数字键盘”
returnKeyType=“go”
占位符='*端口*'
占位符文本颜色={COLOR\u GREY\u 300}
值={this.state.portInput}
onChangeText={text=>this.setState({portInput:text})}/>
*登录*
);
}
//#端区
//#区域侦听器
_onSubmitLogin=()=>{
//装载机附件
这是我的国家({
孤岛加载:正确
});
//Récupération de l'API KEY
让authController=new OBAuthController();
authController.callPostCreateApiKey()。然后((apiKey)=>{
log(“apiKey=“+JSON.stringify(apiKey));
//装载机
这是我的国家({
孤岛加载:false
});
});
}
//#端区
}
导出默认登录信息;
//#区域定义样式表
const styles=StyleSheet.create({
主容器:{
填充:50
},
输入:{
身高:40,
背景颜色:“rgba(22525225,0.3)”,
marginBottom:16,
填充:10,
颜色:'#fff'
},
按钮容器:{
背景颜色:“#2980b6”,
填充垂直:15
},
按钮文字:{
颜色:'白色',
textAlign:'中心',
重量:'700'
},
活动指示器:{
位置:'绝对',
alignSelf:“中心”
}
})

//#endregion
在@Hariks注释之后,我将每个文本输入包装到一个视图中:


this.passwordInput.focus()}
自动更正={false}
keyboardType='email-address'
returnKeyType=“下一步”
占位符=“*电子邮件*”
占位符文本颜色={COLOR\u GREY\u 300}
值={this.state.usernameInput}
onChangeText={text=>this.setState({usernameInput:text})}/>
this.passwordInput=input}
onSubmitEditing={()=>this.urlInput.focus()}
占位符='*Mot de passe*'
returnKeyType=“下一步”
占位符文本颜色={COLOR\u GREY\u 300}
secureTextEntry
值={this.state.passwordInput}
onChangeText={text=>this.setState({passwordInput:text})}/>
this.portInput.focus()}
ref={(输入)=>this.urlInput=input}
自动更正={false}
returnKeyType=“下一步”
占位符='*地址url*'
占位符文本颜色={COLOR\u GREY\u 300}
值={this.state.urlInput}
onChangeText={text=>this.setState({urlInput:text})}/>
this.portInput=input}
自动更正={false}
键盘类型=“数字键盘”